File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 3
3
require_relative 'shared/inspect'
4
4
5
5
describe "Struct#inspect" do
6
- it "returns a string representation showing members and values" do
7
- car = StructClasses ::Car . new ( 'Ford' , 'Ranger' )
8
- car . inspect . should == '#<struct StructClasses::Car make="Ford", model="Ranger", year=nil>'
9
- end
10
-
11
6
it_behaves_like :struct_inspect , :inspect
12
7
end
Original file line number Diff line number Diff line change 1
1
describe :struct_inspect , shared : true do
2
+ it "returns a string representation showing members and values" do
3
+ car = StructClasses ::Car . new ( 'Ford' , 'Ranger' )
4
+ car . send ( @method ) . should == '#<struct StructClasses::Car make="Ford", model="Ranger", year=nil>'
5
+ end
6
+
2
7
it "returns a string representation without the class name for anonymous structs" do
3
8
Struct . new ( :a ) . new ( "" ) . send ( @method ) . should == '#<struct a="">'
4
9
end
You can’t perform that action at this time.
0 commit comments