spec/unit/assertion/exceptions/invalid_error_spec.rb in assertion-0.0.1 vs spec/unit/assertion/exceptions/invalid_error_spec.rb in assertion-0.1.0
- old
+ new
@@ -11,20 +11,10 @@
it { is_expected.to be_frozen }
end # describe .new
- describe "#message" do
-
- subject { error.message }
-
- it "returns a proper message" do
- expect(subject).to include "#{messages.inspect}"
- end
-
- end # describe #message
-
describe "#messages" do
subject { error.messages }
it { is_expected.to eql messages }
@@ -34,7 +24,18 @@
it "doesn't freeze the source messages" do
expect(messages).not_to be_frozen
end
end # describe #message
+
+ describe "#inspect" do
+
+ subject { error.inspect }
+
+ it "returns a verbose string" do
+ expect(subject)
+ .to eql "<Assertion::InvalidError @messages=[\"foo\", \"bar\"]>"
+ end
+
+ end # describe #inspect
end # describe Assertion::InvalidError