diff --git a/lib/factory_girl/proxy/stub.rb b/lib/factory_girl/proxy/stub.rb index 65eafeda1..394057628 100644 --- a/lib/factory_girl/proxy/stub.rb +++ b/lib/factory_girl/proxy/stub.rb @@ -42,10 +42,6 @@ def update_attribute(*args) end end - def next_id - @@next_id += 1 - end - def get(attribute) if @ignored_attributes.has_key?(attribute) @ignored_attributes[attribute] @@ -67,6 +63,12 @@ def result(to_create) run_callbacks(:after_stub) @instance end + + private + + def next_id + @@next_id += 1 + end end end end