Permalink
Browse files

Merge pull request #2 from jredville/patch-1

Add with! to create the target non-lazily
  • Loading branch information...
wireframe committed Aug 26, 2013
2 parents 011575b + c57b31d commit 9bba9f32e9ab5d56048c1d5d858fe1c8a7645366
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/factory_girl/rspec/with.rb
@@ -6,6 +6,10 @@ module With
def with(name, options = {})
let(name) { ::FactoryGirl.create(name, options) }
end
+
+ def with!(name, options = {})
+ let!(name) { ::FactoryGirl.create(name, options) }
+ end
end
end
end

0 comments on commit 9bba9f3

Please sign in to comment.