diff options
author | James Wen <jrw2175@columbia.edu> | 2016-01-06 23:41:50 -0500 |
---|---|---|
committer | James Wen <jrw2175@columbia.edu> | 2016-01-08 01:08:57 -0500 |
commit | 89399b799f09b83170d84320443608043e106d75 (patch) | |
tree | 17f127a6c5b54de7ec8516b63c8bed0c2f234d88 | |
parent | acddc552742ffd3f06a2191c58e90fbadb9c2e98 (diff) | |
download | bundler-89399b799f09b83170d84320443608043e106d75.tar.gz |
Refactor and move `TargetNamespace` module for testing `Bundler::SharedHelpers#const_get_safely` into more specific scope
-rw-r--r-- | spec/bundler/shared_helpers_spec.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/bundler/shared_helpers_spec.rb b/spec/bundler/shared_helpers_spec.rb index d6113ff9ad..4803c66977 100644 --- a/spec/bundler/shared_helpers_spec.rb +++ b/spec/bundler/shared_helpers_spec.rb @@ -1,10 +1,6 @@ require "spec_helper" require "bundler/shared_helpers" -module TargetNamespace - VALID_CONSTANT = 1 -end - describe Bundler::SharedHelpers do describe "#default_gemfile" do subject { Bundler::SharedHelpers.default_gemfile } @@ -27,6 +23,9 @@ describe Bundler::SharedHelpers do end end describe "#const_get_safely" do + module TargetNamespace + VALID_CONSTANT = 1 + end context "when the namespace does have the requested constant" do subject { Bundler::SharedHelpers.const_get_safely(:VALID_CONSTANT, TargetNamespace) } it "returns the value of the requested constant" do |