summaryrefslogtreecommitdiff
path: root/spec/ruby/core/struct/to_s_spec.rb
blob: b9fd413093fc790c6d160240a256694dfef9dc6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)
require File.expand_path('../shared/inspect', __FILE__)

describe "Struct#to_s" do
  it "is a synonym for inspect" do
    car = StructClasses::Car.new('Ford', 'Ranger')
    car.inspect.should == car.to_s
  end

  it_behaves_like(:struct_inspect, :to_s)
end