1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2020-10-24 15:52:37 +02:00
parent 342fbae83c
commit 148961adcd
47 changed files with 725 additions and 61 deletions

View file

@ -22,4 +22,13 @@ describe :unboundmethod_to_s, shared: true do
@from_module.send(@method).should =~ /\bUnboundMethodSpecs::Mod\b/
@from_method.send(@method).should =~ /\bUnboundMethodSpecs::Methods\b/
end
it "returns a String including all details" do
@from_module.send(@method).should.start_with? "#<UnboundMethod: UnboundMethodSpecs::Methods(UnboundMethodSpecs::Mod)#from_mod"
@from_method.send(@method).should.start_with? "#<UnboundMethod: UnboundMethodSpecs::Methods(UnboundMethodSpecs::Mod)#from_mod"
end
it "does not show the defining module if it is the same as the origin" do
UnboundMethodSpecs::A.instance_method(:baz).send(@method).should.start_with? "#<UnboundMethod: UnboundMethodSpecs::A#baz"
end
end