Skip to content

Commit

Permalink
RDoc, not Markdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbarnette committed Sep 11, 2011
1 parent 9e1790e commit 7837aae
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.rdoc
Expand Up @@ -22,8 +22,8 @@ something like:

Next, define some fixtures and factories. Modelizer will load these
when the module is included, using
`"test/{factories,fixtures}/**/*.rb"` as a default glob. Change it by
setting `Modelizer.glob` before module inclusion.
<tt>"test/{factories,fixtures}/**/*.rb"</tt> as a default glob. Change
it by setting <tt>Modelizer.glob</tt> before module inclusion.

Fixture and factory definitions look remarkably similar. The only real
difference is that fixtures get loaded into the DB once at module
Expand All @@ -50,14 +50,14 @@ autogenerated/random data generators. Some examples:
u.password = Faker::Lorem.words(1).first
end

To get a reference to a fixture, the `use` method is added to your
To get a reference to a fixture, the <tt>use</tt> method is added to your
test class:

def test_something
refute_equal use(:artist).name, use("artist/child").name
end

To get an instance from a factory, the `build` and `create` methods
To get an instance from a factory, the <tt>build</tt> and <tt>create</tt> methods
are available:

def test_something_else
Expand All @@ -67,8 +67,9 @@ are available:

=== Custom Assertions

If you require `"modelizer/all"` or include `Modelizer::Assertions`,
Modelizer adds one additional assertion, <tt>assert_invalid</tt>.
If you require <tt>"modelizer/all"</tt> or include
<tt>Modelizer::Assertions</tt>, Modelizer adds one additional
assertion, <tt>assert_invalid</tt>.

assert_invalid :email, model, /is bad/

Expand Down

0 comments on commit 7837aae

Please sign in to comment.