Here is my spec.

describe Exception2db do
  context "attributes" do
    subject { Exception2db.create(:exception => $exception_data_xml) }

    specify { subject.controller.should == 'exception2db/main' }
    specify { subject.error_message.should == 'RuntimeError: 46' }
    specify { subject.user_agent.should == "Mozilla/5.0 (Macintosh; U;
Intel Mac OS X 10_6_3; en-US) AppleWebKit/533.4 (KHTML, like Gecko)
Chrome/5.0.375.38 Safari/533.4" }
  end
end

Here is specdoc.

Exception2db attributes
- should == "exception2db/main"
- should == "RuntimeError: 46"
- should == "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-US)
AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.38 Safari/533.4"

All the tests are passing. However the specdoc message is not very
clean.

How can I improve the message? What am I missing? The idea of wrapping
each of my specify inside "it" to just to have better message is not
very DRY.

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to