Skip to content

Commit

Permalink
Add with! to create the target non-lazily
Browse files Browse the repository at this point in the history
  • Loading branch information
jredville committed Jul 6, 2012
1 parent 011575b commit c57b31d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/factory_girl/rspec/with.rb
Expand Up @@ -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.