Skip to content

Instantly share code, notes, and snippets.

@chaffeqa
Created August 1, 2011 23:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chaffeqa/1119227 to your computer and use it in GitHub Desktop.
Save chaffeqa/1119227 to your computer and use it in GitHub Desktop.
terminal stack-trace (Post: refactoring) (FactoryGirl ruby-1.9.3-preview1 bug)
FactoryGirl.define do
# Administrator Factories
factory :administrator do |f|
f.sequence(:email) {|n| "admin#{n}@test.com" }
f.password "admintester"
end
# Site Factories
factory :site do |f|
f.site_name "Test Site"
f.subdomain "www"
f.has_inventory true
end
# Page Factories
factory :page do |f|
f.sequence(:title) {|n| "Page #{n}"}
f.sequence(:menu_name) {|n| "Page #{n}"}
f.sequence(:shortcut) {|n| "page-#{n}"}
f.layout_name "inside"
f.total_element_areas 2
end
# Element Factoreis
factory :element do |f|
f.title "Test Element"
f.element_area 1
f.association :page
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment