Skip to content

Instantly share code, notes, and snippets.

@seivan
Created March 18, 2010 23:01
Show Gist options
  • Save seivan/337026 to your computer and use it in GitHub Desktop.
Save seivan/337026 to your computer and use it in GitHub Desktop.
Factory.define :user_guest, :class => User do |f|
f.sequence(:username) { |n| "foo#{n}" }
f.password "foobar"
f.password_confirmation { |u| u.password }
f.sequence(:email) { |n| "foo#{n}@example.com" }
f.role "guest"
f.comments {|c| c.association(:comment) }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment