Skip to content

Instantly share code, notes, and snippets.

@maciejsmolinski
Created August 8, 2011 03:02
Show Gist options
  • Save maciejsmolinski/1131133 to your computer and use it in GitHub Desktop.
Save maciejsmolinski/1131133 to your computer and use it in GitHub Desktop.
describe User do
include ClassHelpers
context "new" do
it "should create user with role_id = 2 (registered) by default" do
new_valid_user.role_id.should == 2
new_valid_user.registered?.should be_true
end
it "should create male by default" do
new_valid_user.gender.should == User::Male
end
...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment