Skip to content

Introduce tests #110

merged 7 commits into from Mar 17, 2013

1 participant

Vim-Ruby member

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?

@AndrewRadev AndrewRadev merged commit 2d42507 into master Mar 17, 2013
@AndrewRadev AndrewRadev deleted the tests branch Mar 17, 2013
Vim-Ruby member

I've merged the tests to master. They're doing a good job for me so far and it's too much of a bother to jump between tests and master all the time. If anyone encounters whatever problems due to this, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.