Skip to content

Instantly share code, notes, and snippets.

@alexagui
Created May 9, 2012 23:42
Show Gist options
  • Save alexagui/2649801 to your computer and use it in GitHub Desktop.
Save alexagui/2649801 to your computer and use it in GitHub Desktop.
Everyday Rails RSpec

p.6
launchy and guard-rspec are mentioned but they're not in the Gemfile

p.15

Though it's later explained that Factory() is a shortcut for Factory.create(). The section below might read more clearly with explicit calls to create()

Can you guess the difference? Factory.create() builds the model and saves it, while Factory.build() 
instantiates a new model, but doesn’t save it. If we used Factory.create() in this example it would break 
before we could even run the test, due to the validation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment