Skip to content

Commit

Permalink
Plugging a leaky block scoped variable that Ruby 1.9 was more strict …
Browse files Browse the repository at this point in the history
…about

Signed-off-by: Nick Quaranto <nick@quaran.to>
  • Loading branch information
jasonm authored and qrush committed Jun 17, 2009
1 parent e8ce6b9 commit 452676d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/factory_girl/syntax/generate_spec.rb
Expand Up @@ -25,9 +25,9 @@

%w(generate generate! spawn).each do |method|
it "should yield a generated instance when using #{method} with a block" do
instance = nil
User.send(method) {|instance| }
instance.should be_kind_of(User)
saved_instance = nil
User.send(method) {|instance| saved_instance = instance }
saved_instance.should be_kind_of(User)
end

describe "after generating an instance using #{method}" do
Expand Down

0 comments on commit 452676d

Please sign in to comment.