summaryrefslogtreecommitdiff
path: root/spec/ruby/core/struct/deconstruct_spec.rb
blob: 32d4f6bac45e4fd6b3714313fe3b0b05e602df20 (plain)
1
2
3
4
5
6
7
8
9
10
require_relative '../../spec_helper'

describe "Struct#deconstruct" do
  it "returns an array of attribute values" do
    struct = Struct.new(:x, :y)
    s = struct.new(1, 2)

    s.deconstruct.should == [1, 2]
  end
end