drapergem/draper — pull request #416 by haines (2013-01-12 17:14:57+00:00)
Title: Inherit method security and test against Rails 3.x

* Inherit method security from superclass (closes #415) and add test coverage for that case (previously missing, which is why it got broken - oops). 7554c4c

* Slightly optimise for the (perhaps most common) case when no security is in effect - if `allows` etc have not been called, there is no `Security` object, and there is no need to create one just to check whether a method is allowed. 05e6467

* At this point I discovered that the new version of minitest-rails breaks the build (I should have looked at their master branch when I refactored that stuff the other day!). I took the opportunity to further improve the test integration - now RSpec, minitest-rails and T::U all get the same love through a new [`Draper::TestCase`](https://github.com/haines/draper/blob/eca41450ce41e9de209bfd1689228da5271f0262/lib/draper/test_case.rb), which eliminates the copying and pasting between them. eca4145

* Added tests against all Rails 3.x versions. Happily, after a few minor tweaks to get the dummy app running, only one thing breaks - on 3.0, `ActiveRecord::Base` doesn't call `super` in `==`, which causes [one spec](https://github.com/haines/draper/blob/d528fffe78df140dc7c94681afbb4bffedd8ce80/spec/dummy/spec/models/post_spec.rb#L8) to fail due to `Decoratable#==` never getting called (I think there is a simple workaround, will file a separate issue to discuss). 4539809, d528fff, 76f24c6

* Added rspec-rails to the development dependencies. 77843ff

**NB**: I removed the extra railties in the test integration files. I'm pretty sure this doesn't reintroduce #365 because we switched (d36fab40d) to requiring these files in our own railtie's `after_initialize`, so dependencies will have already been loaded.