diff options
Diffstat (limited to 'spec/ruby/core/struct/size_spec.rb')
-rw-r--r-- | spec/ruby/core/struct/size_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/ruby/core/struct/size_spec.rb b/spec/ruby/core/struct/size_spec.rb new file mode 100644 index 0000000000..29b1d2bfba --- /dev/null +++ b/spec/ruby/core/struct/size_spec.rb @@ -0,0 +1,11 @@ +require File.expand_path('../../../spec_helper', __FILE__) +require File.expand_path('../fixtures/classes', __FILE__) +require File.expand_path('../shared/accessor', __FILE__) + +describe "Struct#size" do + it "is a synonym for length" do + StructClasses::Car.new.size.should == StructClasses::Car.new.length + end + + it_behaves_like :struct_accessor, :size +end |