summaryrefslogtreecommitdiff
path: root/spec/support/matchers.rb
diff options
context:
space:
mode:
authorSHIBATA Hiroshi <hsbt@ruby-lang.org>2018-06-15 18:56:53 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2018-06-15 18:56:53 +0900
commitf24a132cf986029f7418bf63b07c2c237ccbede9 (patch)
treed02b409238517d219f0b9bba5db79dc6f1bdc70a /spec/support/matchers.rb
parent2890c0613a11714dfbe4a9a5e9a77f512dae6e26 (diff)
downloadbundler-f24a132cf986029f7418bf63b07c2c237ccbede9.tar.gz
Move normalize methods to helper methods from rspec example files.
Diffstat (limited to 'spec/support/matchers.rb')
-rw-r--r--spec/support/matchers.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb
index d7c05712ad..a91b7e9e3a 100644
--- a/spec/support/matchers.rb
+++ b/spec/support/matchers.rb
@@ -235,9 +235,8 @@ module Spec
end
end
- def lockfile_should_be(expected, actual = bundled_app("Gemfile.lock"))
- expected = expected.dup.gsub(%r{file:\/\/localhost}, "file://") if defined?(URI::File)
- expect(actual).to read_as(strip_whitespace(expected))
+ def lockfile_should_be(expected)
+ expect(bundled_app("Gemfile.lock")).to read_as(nomalize_uri_file(strip_whitespace(expected)))
end
end
end