Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Plugging a leaky block scoped variable that Ruby 1.9 was more strict …

…about

Signed-off-by: Nick Quaranto <nick@quaran.to>
  • Loading branch information...
commit 452676dfc43928d50ccb3b9e825b5f1caa413feb 1 parent e8ce6b9
@jasonm jasonm authored qrush committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 spec/factory_girl/syntax/generate_spec.rb
View
6 spec/factory_girl/syntax/generate_spec.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.