summaryrefslogtreecommitdiff
path: root/spec/ruby/library/openstruct/frozen_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/openstruct/frozen_spec.rb')
-rw-r--r--spec/ruby/library/openstruct/frozen_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/ruby/library/openstruct/frozen_spec.rb b/spec/ruby/library/openstruct/frozen_spec.rb
index c14a4bac55..c37fd18c8c 100644
--- a/spec/ruby/library/openstruct/frozen_spec.rb
+++ b/spec/ruby/library/openstruct/frozen_spec.rb
@@ -9,25 +9,25 @@ describe "OpenStruct.new when frozen" do
# method_missing case handled in method_missing_spec.rb
#
it "is still readable" do
- @os.age.should eql(70)
- @os.pension.should eql(300)
+ @os.age.should.eql?(70)
+ @os.pension.should.eql?(300)
@os.name.should == "John Smith"
end
it "is not writable" do
- ->{ @os.age = 42 }.should raise_error( RuntimeError )
+ ->{ @os.age = 42 }.should.raise( RuntimeError )
end
it "cannot create new fields" do
- ->{ @os.state = :new }.should raise_error( RuntimeError )
+ ->{ @os.state = :new }.should.raise( RuntimeError )
end
it "creates a frozen clone" do
f = @os.clone
f.frozen?.should == true
f.age.should == 70
- ->{ f.age = 0 }.should raise_error( RuntimeError )
- ->{ f.state = :newer }.should raise_error( RuntimeError )
+ ->{ f.age = 0 }.should.raise( RuntimeError )
+ ->{ f.state = :newer }.should.raise( RuntimeError )
end
it "creates an unfrozen dup" do