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