Test failures with Ruby 2.5
Created by: graaff
With ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux] I'm seeing the following test failures with the released version of 3.7.0:
1) and_wrap_original on a partial double allow(...).to receive(...).and_wrap_original behaves like using and_wrap_original passes in the original method
Failure/Error: expect(value).to eq original_method
expected: #<Method: #<Class:0x000055c5c1a307c8>#results>
got: #<Method: #<#<Class:0x000055c5c1a307c8>:0x000055c5c1a30728>.results>
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-#<Method: #<Class:0x000055c5c1a307c8>#results>
+#<Method: #<#<Class:0x000055c5c1a307c8>:0x000055c5c1a30728>.results>
Shared Example Group: "using and_wrap_original" called from ./spec/rspec/mocks/and_wrap_original_spec.rb:66
# ./spec/rspec/mocks/and_wrap_original_spec.rb:34:in `block (4 levels) in <top (required)>'
2) and_wrap_original on a partial double allow_any_instance_of(...).to receive(...).and_wrap_original behaves like using and_wrap_original passes in the original method
Failure/Error: expect(value).to eq original_method
expected: #<Method: #<Class:0x000055c5c1a044e8>#results>
got: #<Method: #<#<Class:0x000055c5c1a044e8>:0x000055c5c1a04448>.__results_without_any_instance__(results)>
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-#<Method: #<Class:0x000055c5c1a044e8>#results>
+#<Method: #<#<Class:0x000055c5c1a044e8>:0x000055c5c1a04448>.__results_without_any_instance__(results)>
Shared Example Group: "using and_wrap_original" called from ./spec/rspec/mocks/and_wrap_original_spec.rb:72
# ./spec/rspec/mocks/and_wrap_original_spec.rb:34:in `block (4 levels) in <top (required)>'
3) Constant Mutating #hide_const for an unloaded constant with nested name that matches a top-level constant does not affect the ability to access the top-level constant from nested contexts
Failure/Error: expect(TestClass::Hash).to equal(top_level_hash)
NameError:
uninitialized constant TestClass::Hash
Did you mean? Hash
# ./spec/rspec/mocks/mutate_const_spec.rb:177:in `block (4 levels) in <module:Mocks>'