summaryrefslogtreecommitdiff
path: root/spec/ruby/core/env/shared/length.rb
blob: 6d788a3f4a128818429fab0b903503b39fc8dc81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
describe :env_length, shared: true do
  it "returns the number of ENV entries" do
    orig = ENV.to_hash
    begin
      ENV.clear
      ENV["foo"] = "bar"
      ENV["baz"] = "boo"
      ENV.send(@method).should == 2
    ensure
      ENV.replace orig
    end
  end
end