Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 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, splitjoin.vim, 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?