Created
March 4, 2010 23:46
-
-
Save cyx/322272 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe Reply do | |
it_should_behave_like AnActiveModel | |
it { should validate_length_of(:body, :within => 1..140) } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gist.github.com/579839
It should goes straight into your spec_helper.rb (or in another file which you'll require within spec_helper.rb).
If your using 1.9.2, you'll face a bug with super being called on singleton methods. Just wrap all methods with a super call with an eval %( … ) closure.