diff options
Diffstat (limited to 'spec/ruby/core/struct/length_spec.rb')
| -rw-r--r-- | spec/ruby/core/struct/length_spec.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/spec/ruby/core/struct/length_spec.rb b/spec/ruby/core/struct/length_spec.rb index 067bb08f88..8d48f4118d 100644 --- a/spec/ruby/core/struct/length_spec.rb +++ b/spec/ruby/core/struct/length_spec.rb @@ -1,12 +1,8 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../fixtures/classes', __FILE__) -require File.expand_path('../shared/accessor', __FILE__) +require_relative '../../spec_helper' +require_relative 'fixtures/classes' describe "Struct#length" do - it "returns the number of attributes" do - StructClasses::Car.new('Cadillac', 'DeVille').length.should == 3 - StructClasses::Car.new.length.should == 3 + it "is an alias of Struct#size" do + StructClasses::Car.instance_method(:length).should == StructClasses::Car.instance_method(:size) end - - it_behaves_like :struct_accessor, :length end |
