summaryrefslogtreecommitdiff
path: root/spec/rubyspec/core/env/shared/include.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubyspec/core/env/shared/include.rb')
-rw-r--r--spec/rubyspec/core/env/shared/include.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/rubyspec/core/env/shared/include.rb b/spec/rubyspec/core/env/shared/include.rb
new file mode 100644
index 0000000000..8d8311dcf2
--- /dev/null
+++ b/spec/rubyspec/core/env/shared/include.rb
@@ -0,0 +1,11 @@
+describe :env_include, shared: true do
+ it "returns true if ENV has the key" do
+ ENV["foo"] = "bar"
+ ENV.send(@method, "foo").should == true
+ ENV.delete "foo"
+ end
+
+ it "returns false if ENV doesn't include the key" do
+ ENV.send(@method, "should_never_be_set").should == false
+ end
+end