1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/ruby/core/env/shared/key.rb
2019-06-27 21:02:36 +02:00

11 lines
316 B
Ruby

describe :env_key, shared: true do
it "returns the index associated with the passed value" do
ENV["foo"] = "bar"
ENV.send(@method, "bar").should == "foo"
ENV.delete "foo"
end
it "returns nil if the passed value is not found" do
ENV.send(@method, "should_never_be_set").should be_nil
end
end