diff options
Diffstat (limited to 'spec/ruby/core/env/index_spec.rb')
-rw-r--r-- | spec/ruby/core/env/index_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/ruby/core/env/index_spec.rb b/spec/ruby/core/env/index_spec.rb index 04986a0421..43875f5a50 100644 --- a/spec/ruby/core/env/index_spec.rb +++ b/spec/ruby/core/env/index_spec.rb @@ -3,4 +3,10 @@ require_relative 'shared/key' describe "ENV.index" do it_behaves_like :env_key, :index + + it "warns about deprecation" do + -> do + ENV.index("foo") + end.should complain(/warning: ENV.index is deprecated; use ENV.key/) + end end |