Permalink
Browse files

Fix README example spec to display actual output

  • Loading branch information...
1 parent 53d3c0b commit 8020b56dc96db1bc03023e2a8a69c0ad4142238b @pjg pjg committed Mar 9, 2013
Showing with 7 additions and 4 deletions.
  1. +7 −4 README.md
View
@@ -198,8 +198,10 @@ this before you write any implementation code:
```ruby
# in spec/calculator_spec.rb
describe Calculator do
- it "add(x,y) returns the sum of its arguments" do
- expect(Calculator.new.add(1, 2)).to eq(3)
+ describe '#add' do
+ it 'returns the sum of its arguments' do
+ expect(Calculator.new.add(1, 2)).to eq(3)
+ end
end
end
```
@@ -244,8 +246,9 @@ Use the `documentation` formatter to see the resulting spec:
```
$ rspec spec/calculator_spec.rb --format doc
-Calculator add
- returns the sum of its arguments
+Calculator
+ #add
+ returns the sum of its arguments
Finished in 0.000379 seconds
1 example, 0 failures

0 comments on commit 8020b56

Please sign in to comment.