Skip to content

Commit

Permalink
Add specs for Struct#deconstruct
Browse files Browse the repository at this point in the history
  • Loading branch information
andrykonchin committed Jan 16, 2020
1 parent 4a39267 commit 9cfe5b8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions core/struct/deconstruct_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require_relative '../../spec_helper'

ruby_version_is "2.7" do
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
end

0 comments on commit 9cfe5b8

Please sign in to comment.