Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce tests #110

Merged
merged 7 commits into from
Mar 17, 2013
Merged

Introduce tests #110

merged 7 commits into from
Mar 17, 2013

Conversation

AndrewRadev
Copy link
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 March 17, 2013 10:59
@AndrewRadev
Copy link
Member Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant