Skip to content

Commit

Permalink
Updated to the README.
Browse files Browse the repository at this point in the history
  • Loading branch information
notahat committed Jun 20, 2011
1 parent d2176e8 commit f52fb87
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.markdown
Expand Up @@ -30,8 +30,8 @@ for the attributes you don't care about, and constructs any necessary
associated objects, leaving you to specify only the fields you care about in
your test. For example:

describe Comment do
it "should not include spam in the without_spam scope" do
describe Comment, "without_spam scope" do
it "doesn't include spam" do
# This will make a Comment, a Post, and a User (the author of the
# Post), generate values for all their attributes, and save them:
spam = Comment.make!(:spam => true)
Expand All @@ -40,7 +40,6 @@ your test. For example:
end
end


You tell Machinist how to do this with blueprints:

require 'machinist/active_record'
Expand Down Expand Up @@ -80,11 +79,12 @@ Then run:
rails generate machinist:install

If you want Machinist to automatically add a blueprint to your blueprints file
whenever you generate a model, add the following to your
`config/application.rb` in the `config.generators` section:

g.fixture_replacement :machinist
whenever you generate a model, add the following to your `config/application.rb`
inside the Application class:

config.generators do |g|
g.fixture_replacement :machinist
end

### Rails 2

Expand All @@ -97,7 +97,7 @@ See [the wiki](http://wiki.github.com/notahat/machinist/rails-2).

A blueprint describes how to generate an object. The blueprint takes care of
providing attributes that your test doesn't care about, leaving you to focus on
the just the attributes that are important for the test.
just the attributes that are important for the test.

A simple blueprint might look like this:

Expand Down

0 comments on commit f52fb87

Please sign in to comment.