test/liner/inspectable_test.rb in liner-0.2.2 vs test/liner/inspectable_test.rb in liner-0.2.3
- old
+ new
@@ -1,9 +1,17 @@
describe Liner::Inspectable do
- subject { Cheeseburger.new(meat: 'turkey') }
+ subject { Cheeseburger.new(:meat => 'turkey') }
it "#inspect must include all attributes" do
- subject.inspect.must_equal '#<Cheeseburger bun=nil, meat="turkey", cheese=nil>'
+ subject.to_s.must_include '#<Cheeseburger'
+ subject.to_s.must_include '>'
+ subject.to_s.must_include 'bun=nil'
+ subject.to_s.must_include 'meat="turkey"'
+ subject.to_s.must_include 'cheese=nil'
end
it "#to_s must include all attributes" do
- subject.to_s.must_equal '#<Cheeseburger bun=nil, meat="turkey", cheese=nil>'
+ subject.to_s.must_include '#<Cheeseburger'
+ subject.to_s.must_include '>'
+ subject.to_s.must_include 'bun=nil'
+ subject.to_s.must_include 'meat="turkey"'
+ subject.to_s.must_include 'cheese=nil'
end
end