solnic/virtus — pull request #166 by jgaskins (2013-05-21 00:03:51+00:00)
Title: Remove RSpec deprecation warnings

There is a deprecation warning in RSpec about calling objects defined in
`let` and `subject` blocks inside a `before(:all)` block. This PR knocks
that out by getting a fresh version of the model (by duping the class)
for each spec example. This is so that we can check that the accepted
options are set properly by default (the reason that there were
expectations in the `before(:all)` block before).

This also eliminates two unnecessary specs. Before, it was being
verified that both the model and its descendant were responding to a
message that was being sent to the model in a before hook.

Testing that the model responds to it is unnecessary because if it
doesn't it'll fail when it's called. Testing that a subclass responds
to a method defined in a superclass is testing that Ruby is actually an
object-oriented language. :-)