diff options
Diffstat (limited to 'spec/rubyspec/core/array/constructor_spec.rb')
| -rw-r--r-- | spec/rubyspec/core/array/constructor_spec.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/spec/rubyspec/core/array/constructor_spec.rb b/spec/rubyspec/core/array/constructor_spec.rb deleted file mode 100644 index 8ec2e5de1e..0000000000 --- a/spec/rubyspec/core/array/constructor_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../fixtures/classes', __FILE__) - -describe "Array.[]" do - it "returns a new array populated with the given elements" do - obj = Object.new - Array.[](5, true, nil, 'a', "Ruby", obj).should == [5, true, nil, "a", "Ruby", obj] - - a = ArraySpecs::MyArray.[](5, true, nil, 'a', "Ruby", obj) - a.should be_an_instance_of(ArraySpecs::MyArray) - a.inspect.should == [5, true, nil, "a", "Ruby", obj].inspect - end -end - -describe "Array[]" do - it "is a synonym for .[]" do - obj = Object.new - Array[5, true, nil, 'a', "Ruby", obj].should == Array.[](5, true, nil, "a", "Ruby", obj) - - a = ArraySpecs::MyArray[5, true, nil, 'a', "Ruby", obj] - a.should be_an_instance_of(ArraySpecs::MyArray) - a.inspect.should == [5, true, nil, "a", "Ruby", obj].inspect - end -end |
