summaryrefslogtreecommitdiff
path: root/spec/ruby/core/env/key_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/env/key_spec.rb')
-rw-r--r--spec/ruby/core/env/key_spec.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/ruby/core/env/key_spec.rb b/spec/ruby/core/env/key_spec.rb
index cf70286409..56f5f609a7 100644
--- a/spec/ruby/core/env/key_spec.rb
+++ b/spec/ruby/core/env/key_spec.rb
@@ -1,8 +1,9 @@
require_relative '../../spec_helper'
-require_relative 'shared/include'
describe "ENV.key?" do
- it_behaves_like :env_include, :key?
+ it "is an alias of ENV.include?" do
+ ENV.method(:key?).should == ENV.method(:include?)
+ end
end
describe "ENV.key" do
@@ -21,7 +22,7 @@ describe "ENV.key" do
it "returns nil if the passed value is not found" do
ENV.delete("foo")
- ENV.key("foo").should be_nil
+ ENV.key("foo").should == nil
end
it "coerces the key element with #to_str" do
@@ -34,6 +35,6 @@ describe "ENV.key" do
it "raises TypeError if the argument is not a String and does not respond to #to_str" do
-> {
ENV.key(Object.new)
- }.should raise_error(TypeError, "no implicit conversion of Object into String")
+ }.should.raise(TypeError, "no implicit conversion of Object into String")
end
end