1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eregon 2018-01-29 16:08:16 +00:00
parent 1e658d45e1
commit 3fa5bd38af
494 changed files with 4133 additions and 3109 deletions

View file

@ -2,5 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/each.rb', __FILE__)
describe "ENV.each_pair" do
it_behaves_like(:env_each, :each_pair)
it_behaves_like :env_each, :each_pair
end

View file

@ -2,5 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/each.rb', __FILE__)
describe "ENV.each" do
it_behaves_like(:env_each, :each)
it_behaves_like :env_each, :each
end

View file

@ -2,5 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/store.rb', __FILE__)
describe "ENV.[]=" do
it_behaves_like(:env_store, :[]=)
it_behaves_like :env_store, :[]=
end

View file

@ -1,4 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../../../shared/hash/key_error', __FILE__)
describe "ENV.fetch" do
it "returns a value" do
@ -11,8 +12,8 @@ describe "ENV.fetch" do
lambda { ENV.fetch :should_never_be_set }.should raise_error(TypeError)
end
it "raises a KeyError if the key is not found" do
lambda { ENV.fetch "should_never_be_set" }.should raise_error(KeyError)
context "when the key is not found" do
it_behaves_like :key_error, ->(obj, key) { obj.fetch(key) }, ENV
end
it "provides the given default parameter" do

View file

@ -2,5 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/include.rb', __FILE__)
describe "ENV.has_key?" do
it_behaves_like(:env_include, :has_key?)
it_behaves_like :env_include, :has_key?
end

View file

@ -2,5 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/value.rb', __FILE__)
describe "ENV.has_value?" do
it_behaves_like(:env_value, :has_value?)
it_behaves_like :env_value, :has_value?
end

View file

@ -2,5 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/include.rb', __FILE__)
describe "ENV.include?" do
it_behaves_like(:env_include, :include?)
it_behaves_like :env_include, :include?
end

View file

@ -2,5 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/key.rb', __FILE__)
describe "ENV.index" do
it_behaves_like(:env_key, :index)
it_behaves_like :env_key, :index
end

View file

@ -3,9 +3,9 @@ require File.expand_path('../shared/include.rb', __FILE__)
require File.expand_path('../shared/key.rb', __FILE__)
describe "ENV.key?" do
it_behaves_like(:env_include, :key?)
it_behaves_like :env_include, :key?
end
describe "ENV.key" do
it_behaves_like(:env_key, :key)
it_behaves_like :env_key, :key
end

View file

@ -2,5 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/length.rb', __FILE__)
describe "ENV.length" do
it_behaves_like(:env_length, :length)
it_behaves_like :env_length, :length
end

View file

@ -2,5 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/include.rb', __FILE__)
describe "ENV.member?" do
it_behaves_like(:env_include, :member?)
it_behaves_like :env_include, :member?
end

View file

@ -2,5 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/length.rb', __FILE__)
describe "ENV.size" do
it_behaves_like(:env_length, :size)
it_behaves_like :env_length, :size
end

View file

@ -2,5 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/store.rb', __FILE__)
describe "ENV.store" do
it_behaves_like(:env_store, :store)
it_behaves_like :env_store, :store
end

View file

@ -2,5 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/to_hash.rb', __FILE__)
describe "ENV.to_hash" do
it_behaves_like(:env_to_hash, :to_h)
it_behaves_like :env_to_hash, :to_h
end

View file

@ -2,5 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/to_hash.rb', __FILE__)
describe "ENV.to_hash" do
it_behaves_like(:env_to_hash, :to_hash)
it_behaves_like :env_to_hash, :to_hash
end

View file

@ -2,5 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/value.rb', __FILE__)
describe "ENV.value?" do
it_behaves_like(:env_value, :value?)
it_behaves_like :env_value, :value?
end