Skip to content

Commit

Permalink
Minor clean ups to instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
francois committed Apr 1, 2011
1 parent 1d95330 commit cdf354a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.textile
Expand Up @@ -11,12 +11,11 @@ You're knee deep in a debugger session, and you can't understand why something's

<pre><code># Somewhere deep in your tests
test "the frobble touches the widget" do
debugger
assert_equal 42, frobble.widget_id
end
</code></pre>

You've been on this <code>assert_equal</code> call for the past hour wondering...:
You've been on this <code>assert_equal</code> call for the past hour wondering. Frustration's been mounting, because you don't understand why the frobble doesn't touch the widget. Clearly, there's something wrong with the fixtures, but you can't understand what it is. Time to fire up the debugger and dump the data:

<pre><code>[814, 823] in test/unit/widget_test.rb
814 frobble.save!
Expand All @@ -34,15 +33,14 @@ test/unit/widget_test.rb:819
(rdb:112)
</code></pre>

Luckily, you have the DataDumper gem already declared in your Gemfile (if not, declare it, <code>bundle install</code>, then run your tests again), and type:
Since the <code>data_dumper</code> gem is already declared in your Gemfile (if not, declare it, <code>bundle install</code>, then run your tests again), type:

<pre><code>(rdb:112) File.mkdir(Rails.root + "dump")
(rdb:113) DataDumper.dump(Rails.root + "dump")</code></pre>

Then, finish your failing tests, and from the trusty command line:
Then, quit your failing tests, and from the trusty command line:

<pre><code>$ rails console
> require "data_dumper"
> DataDumper.load(Rails.root + "dump")
> exit

Expand Down

0 comments on commit cdf354a

Please sign in to comment.