Permalink
Browse files

Add with! to create the target non-lazily

  • Loading branch information...
1 parent 011575b commit c57b31d7368ad898aaf548a9888c2fcbe4756c05 @jredville jredville committed Jul 6, 2012
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 c57b31d

Please sign in to comment.