1 shared :env_each do |cmd|
2 describe "ENV.#{cmd}" do
4 it "returns each pair" do
11 ENV.send(cmd) { |k, v| e << [k, v] }
12 e.should include(["foo", "bar"])
13 e.should include(["baz", "boo"])
19 ruby_version_is "" ... "1.8.7" do
20 it "raises LocalJumpError if no block given" do
21 lambda { ENV.send(cmd) }.should raise_error(LocalJumpError)
25 ruby_version_is "1.8.7" do
26 it "returns an Enumerator if called without a block" do
27 ENV.send(cmd).should be_kind_of(Enumerable::Enumerator)