vim-ruby/vim-ruby — pull request #110 by AndrewRadev (2012-10-06 11:59:45+00:00)
Title: Introduce tests

This pull request implements rspec tests for indentation. Their goal is not to be complete, but to at least provide a safety net for regressions. For now, they test a few of the more recent bug reports. I intend to write some tests for more basic functionality (simple "if"-blocks, "do"-blocks, things like that), one small case a time. It might also be possible to test other areas as well, like syntax highlighting, but I haven't experimented much with those. Completion in particular might not even be possible to test this way, given that a lot of the bugs are specific to a version of ruby, or of the operating system.

The implementation uses my own [vimrunner](https://github.com/AndrewRadev/vimrunner) gem to spawn a gvim/mvim instance and run it through the examples. On my machine, they run in around 5-6 seconds.

I hope that this test suite won't radically interfere with anybody's workflow, since I intend to put the project under Travis CI if it's merged, which means that nobody will have to run the tests if they don't want to. If the build breaks for some reason, I would do my best to investigate it myself and help out with fixing the code or the tests. With that, I don't think this would be very radical change for the project.

Of course, this still means I would include my own personal, probably quite immature, library in the project. I've had great results with using it for my personal projects ([switch.vim](https://github.com/AndrewRadev/switch.vim/tree/master/spec), [splitjoin.vim](https://github.com/AndrewRadev/splitjoin.vim/tree/master/spec), [sideways.vim](https://github.com/AndrewRadev/sideways.vim)), so I hope they'll work just as well in vim-ruby. Still, it's not something I'm comfortable with merging straight away without asking for permission first :). Basically, I'd like to hear at least one other collaborator support me before merging to master.

So, @tpope, @now, @segfault, @dkearns, what do you think?