diff options
Diffstat (limited to 'spec/ruby/core/array/compact_spec.rb')
| -rw-r--r-- | spec/ruby/core/array/compact_spec.rb | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/spec/ruby/core/array/compact_spec.rb b/spec/ruby/core/array/compact_spec.rb index 4818217be1..83b3fa2a89 100644 --- a/spec/ruby/core/array/compact_spec.rb +++ b/spec/ruby/core/array/compact_spec.rb @@ -21,18 +21,6 @@ describe "Array#compact" do it "does not return subclass instance for Array subclasses" do ArraySpecs::MyArray[1, 2, 3, nil].compact.should be_an_instance_of(Array) end - - it "does not keep tainted status even if all elements are removed" do - a = [nil, nil] - a.taint - a.compact.tainted?.should be_false - end - - it "does not keep untrusted status even if all elements are removed" do - a = [nil, nil] - a.untrust - a.compact.untrusted?.should be_false - end end describe "Array#compact!" do @@ -57,21 +45,7 @@ describe "Array#compact!" do [1, 2, false, 3].compact!.should == nil end - it "keeps tainted status even if all elements are removed" do - a = [nil, nil] - a.taint - a.compact! - a.tainted?.should be_true - end - - it "keeps untrusted status even if all elements are removed" do - a = [nil, nil] - a.untrust - a.compact! - a.untrusted?.should be_true - end - - it "raises a #{frozen_error_class} on a frozen array" do - lambda { ArraySpecs.frozen_array.compact! }.should raise_error(frozen_error_class) + it "raises a FrozenError on a frozen array" do + -> { ArraySpecs.frozen_array.compact! }.should raise_error(FrozenError) end end |
