Skip to content

Instantly share code, notes, and snippets.

@luisalima
Created December 19, 2012 18:35
Show Gist options
  • Save luisalima/4339197 to your computer and use it in GitHub Desktop.
Save luisalima/4339197 to your computer and use it in GitHub Desktop.
Testing models without vs. with shoulda
# without shoulda... tons of code :-)
it "should belong to person" do
Model.reflect_on_association(:person).macro.should == :belongs_to
end
# with shoulda... one-liner!
it{should belong_to(:person)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment