Skip to content

Commit

Permalink
clearer example descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
justinko committed May 30, 2011
1 parent 4303e77 commit 67bbae7
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions spec/rspec/rails/mocks/mock_model_spec.rb
Expand Up @@ -198,17 +198,12 @@
end

describe "#to_s" do
before(:each) do
@param = to_param
@model = mock_model(MockableModel)
end

it "returns class name underscore rspec context id" do
@model.to_s.should == "MockableModel_#{@param}"
it "returns (model.name)_(model#to_param)" do
mock_model(MockableModel).to_s.should == "MockableModel_#{to_param}"
end

context "stubbed to return 'foobar'" do
it "returns 'foobar'" do
context "that is stubbed" do
it "returns the stub" do
mock_model(MockableModel, :to_s => 'foobar').to_s.should == 'foobar'
end
end
Expand Down

0 comments on commit 67bbae7

Please sign in to comment.