spec/rspec/messages_spec.rb in surrogate-0.3.2 vs spec/rspec/messages_spec.rb in surrogate-0.4.2
- old
+ new
@@ -9,25 +9,26 @@
messages_for.inspect_argument("1").should == '"1"'
messages_for.inspect_argument(1).should == "1"
messages_for.inspect_argument([/a/]).should == "[/a/]"
end
- it 'inspects no_args matcher' do
- messages_for.inspect_argument(no_args).should == 'no_args'
+ it 'inspects rspec matchers' do
+ messages_for.inspect_argument(no_args).should == 'no args'
+ messages_for.inspect_argument(hash_including abc: 123).should == 'hash_including(:abc=>123)'
end
end
describe 'multiple argument inspection' do
it "wraps individual arguments in `'" do
messages_for.inspect_arguments([/a/]).should == "`/a/'"
end
it "joins arguments with commas" do
- messages_for.inspect_arguments(['x', no_args]).should == "`\"x\", no_args'"
+ messages_for.inspect_arguments(['x', no_args]).should == "`\"x\", no args'"
end
it 'returns no_args when the array is empty' do
- messages_for.inspect_arguments([]).should == "`no_args'"
+ messages_for.inspect_arguments([]).should == "`no args'"
end
end
end