tpitale/simplest_view — pull request #2 by squarism (2013-02-19 04:16:36+00:00)
Title: Added specs

Getting the testing suite started. I have two tests for the integration side of things and one unit test. A good starting point. I can fill it out some more to get coverage after you take a look.

The general strategy is:
- run rake spec:simplest_view for unit tests
- run rake spec:integration for the rails integration test
- run rake spec for the whole thing

The integration test use an embedded rails app. I'm sorry about the number of files that an embedded app adds but this is the style I see the most and how I've done it for a Rails gem before. I tried to remove as much as I could on the first pass. Maybe I can trim more.

I also tried to keep the gem deps to a minimum. But had to add some to get it to work. I tested that no 'gem install' dependencies were added (for users) even though I added some things to the Gemfile. Here is a test of this:

gem install simplest_view-0.0.2.gem
Successfully installed simplest_view-0.0.2
1 gem installed

Yay!

In the future, I'll just branch again and do another pull request. Just would like you to see the progress. I know figuring out a test suite for rails plugins is a huge PITA. Hopefully this puts your worries at rest (if you had some).

Also buried in the commits is a small README typo. Sorry for throwing that in. Didn't want a whole other PR just for that. :monkey_face: