wireframe/factory_girl_rspec — pull request #3 by chendrix (2012-09-10 17:38:05+00:00)
Title: Move from default create to build, and move from let to subject

1. I've changed `with` to use `FactoryGirl.build` instead of `FactoryGirl.create` to allow you to use `with` for invalid/non-saveable factories.

To compensate, I've also written a new `create` method that uses the `FactoryGirl.create` method, for when explicitly testing saved models.

2. I've changed it from a default `let` to a `subject`, allowing you to remove the tedious rewrites of your variable name

```ruby
# before
with :user
it { user.should ... }

# after
with :user
it { should ... }
```

3. You weren't explicitly passing any blocks from your method to FactoryGirl's method. According to the [FactoryGirl specs](https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md#using-factories) this should be available.