thoughtbot/factory_girl — Issue #245: undefined method `next' for Factory:Module when using Ruby 1.9.3
Author: michaelkoper
Created: 2011-11-22 12:22:54+00:00
State: open

When I use Ruby 1.9.3 I get the following error when starting the page.

/Users/michaelkoper/.rvm/gems/ruby-1.9.3-preview1@***/gems/factory_girl-2.3.0/lib/factory_girl/deprecated.rb:7:in `method_missing': undefined method `next' for Factory:Module (NoMethodError)
from /Users/michaelkoper/code//spec/factories/user.rb:20:in `block (2 levels) in '

In my factory

sequence :user_name do |n|
"user#{n}"
end

and on line 20:

name Factory.next :user_name

using Ruby 1.9.3 and Factory girl 2.3.0