mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
11 lines
316 B
Ruby
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
|