2018-03-04 10:09:32 -05:00
|
|
|
require_relative '../../spec_helper'
|
|
|
|
require_relative 'fixtures/classes'
|
|
|
|
require_relative 'shared/inspect'
|
2017-05-07 08:04:49 -04:00
|
|
|
|
|
|
|
describe "Struct#inspect" do
|
2019-02-21 10:38:59 -05:00
|
|
|
it "returns a string representation showing members and values" do
|
2017-05-07 08:04:49 -04:00
|
|
|
car = StructClasses::Car.new('Ford', 'Ranger')
|
|
|
|
car.inspect.should == '#<struct StructClasses::Car make="Ford", model="Ranger", year=nil>'
|
|
|
|
end
|
|
|
|
|
2018-01-29 11:08:16 -05:00
|
|
|
it_behaves_like :struct_inspect, :inspect
|
2017-05-07 08:04:49 -04:00
|
|
|
end
|