summaryrefslogtreecommitdiff
path: root/spec/ruby/core/module/attr_reader_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/module/attr_reader_spec.rb')
-rw-r--r--spec/ruby/core/module/attr_reader_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/core/module/attr_reader_spec.rb b/spec/ruby/core/module/attr_reader_spec.rb
index 37fd537ff5..2b4ca2100e 100644
--- a/spec/ruby/core/module/attr_reader_spec.rb
+++ b/spec/ruby/core/module/attr_reader_spec.rb
@@ -30,7 +30,7 @@ describe "Module#attr_reader" do
attr_reader :spec_attr_reader
end
- -> { true.instance_variable_set("@spec_attr_reader", "a") }.should raise_error(RuntimeError)
+ -> { true.instance_variable_set("@spec_attr_reader", "a") }.should.raise(RuntimeError)
end
it "converts non string/symbol names to strings using to_str" do
@@ -45,9 +45,9 @@ describe "Module#attr_reader" do
it "raises a TypeError when the given names can't be converted to strings using to_str" do
o = mock('o')
- -> { Class.new { attr_reader o } }.should raise_error(TypeError)
+ -> { Class.new { attr_reader o } }.should.raise(TypeError)
(o = mock('123')).should_receive(:to_str).and_return(123)
- -> { Class.new { attr_reader o } }.should raise_error(TypeError)
+ -> { Class.new { attr_reader o } }.should.raise(TypeError)
end
it "applies current visibility to methods created" do
@@ -56,11 +56,11 @@ describe "Module#attr_reader" do
attr_reader :foo
end
- -> { c.new.foo }.should raise_error(NoMethodError)
+ -> { c.new.foo }.should.raise(NoMethodError)
end
it "is a public method" do
- Module.should have_public_instance_method(:attr_reader, false)
+ Module.public_instance_methods(false).should.include?(:attr_reader)
end
it "returns an array of defined method names as symbols" do