diff --git a/lib/flexmock/spy_describers.rb b/lib/flexmock/spy_describers.rb index 9e6105f..db7c27a 100644 --- a/lib/flexmock/spy_describers.rb +++ b/lib/flexmock/spy_describers.rb @@ -18,7 +18,7 @@ def describe_spy_negative_expectation(spy, sym, args, kw, options={}) end def describe_spy(spy, sym, args, kw, options, not_clause="") - result = "expected " + result = +"expected " result << FlexMock.format_call(sym, args, kw) result << " to#{not_clause} be received by " << spy.inspect result << times_description(options[:times]) @@ -29,7 +29,7 @@ def describe_spy(spy, sym, args, kw, options, not_clause="") end def describe_calls(spy) - result = '' + result = +'' if spy.flexmock_calls.empty? result << "No messages have been received\n" else diff --git a/test/container_methods_test.rb b/test/container_methods_test.rb index 0c32d80..fca9319 100644 --- a/test/container_methods_test.rb +++ b/test/container_methods_test.rb @@ -113,7 +113,7 @@ def test_stubs_are_auto_verified end def test_stubbing_a_string - s = "hello" + s = +"hello" flexmock(:base, s, :length => 2) assert_equal 2, s.length end diff --git a/test/partial_mock_test.rb b/test/partial_mock_test.rb index beb8f8f..b0f41d2 100644 --- a/test/partial_mock_test.rb +++ b/test/partial_mock_test.rb @@ -634,7 +634,7 @@ def test_partial_mocks_leaves_NoMethodError_exceptions_raised_by_the_original_me exception = assert_raises(NameError) do obj.mocked_method end - assert_match(/undefined method `does_not_exist' for/, exception.message) + assert_match(/undefined method [`']does_not_exist' for/, exception.message) end def test_it_checks_whether_mocks_are_forbidden_before_forwarding_the_call diff --git a/test/rspec_integration/integration_spec.rb b/test/rspec_integration/integration_spec.rb index 32c5035..c10b4e2 100644 --- a/test/rspec_integration/integration_spec.rb +++ b/test/rspec_integration/integration_spec.rb @@ -32,7 +32,7 @@ end specify "should be able to create a stub" do - s = "Hello World" + s = +"Hello World" flexmock(:base, s).should_receive(:downcase).with().once.and_return("hello WORLD") expect(s.downcase).to eq("hello WORLD")