I am trying to set the factory girl setting with rails 3, but I get this error when I rake cucumber:
james@james-laptop:~/rails-projs/simple-beach-63$ rake cucumber:wip
(in /home/james/rails-projs/simple-beach-63)
bundle exec /usr/bin/ruby1.8 -I "/usr/lib/ruby/gems/1.8/gems/cucumber-0.9.4/lib:lib"
"/ USR / Library / ruby ββ/ stones / 1,8 / gems / cucumber 0.9.4 / bin / cucumber" --profile wip Using a wip profile ... uninitialized constant factory (NameError) / usr / lib / ruby ββ/ gems / 1.8 / gems / rspec-expectations-2.1.0 / lib / rspec / expectations / backward_compatibility.rb: 6: in const_missing'
/usr/lib/ruby/gems/1.8/gems/factory_girl-1.3.3/lib/factory_girl/step_definitions.rb:25
/home/james/rails-projs/simple-beach-63/features/support/env.rb:8:inrequired "/ home / james / rails -projs / simple-beach-63 / features / support / env. rb: 8
Can you pull and take a look when you get a second?
I have this in the gemfile:
gem 'factory_girl_rails'
gem 'factory_girl'
I have it in the function /support/env.rb
require "factory_girl/step_definitions"
require "factory_girl"
require File.dirname(__FILE__) + "/factories"
and then I define the factory in the /support/factories.rb functions
I would be grateful for any help