Skip to content

Instantly share code, notes, and snippets.

@jaysonrowe
Created September 7, 2011 21:32
Show Gist options
  • Save jaysonrowe/1201814 to your computer and use it in GitHub Desktop.
Save jaysonrowe/1201814 to your computer and use it in GitHub Desktop.
describe User do
before(:each) do
@attr = { :name => "Example User", :email => "user@example.com" }
end
.
.
.
it "should require an email address" do
no_email_user = User.new(@attr.merge(:email => ""))
no_email_user.should_not be_valid
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment