Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/lock/lockfile_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
end

it "does not update the lockfile's bundler version if nothing changed during bundle install" do
version = "#{Bundler::VERSION.split(".").first}.0.0.0.a"
version = "#{Bundler::VERSION.split(".").first}.0.0.a"

lockfile <<-L
GEM
Expand Down
12 changes: 8 additions & 4 deletions spec/support/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -268,18 +268,22 @@ def create_file(*args)
end

def gemfile(*args)
if args.empty?
contents = args.shift

if contents.nil?
File.open("Gemfile", "r", &:read)
else
create_file("Gemfile", *args)
create_file("Gemfile", contents, *args)
end
end

def lockfile(*args)
if args.empty?
contents = args.shift

if contents.nil?
File.open("Gemfile.lock", "r", &:read)
else
create_file("Gemfile.lock", *args)
create_file("Gemfile.lock", normalize_uri_file(contents), *args)
end
end

Expand Down
4 changes: 2 additions & 2 deletions spec/support/matchers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def indent(string, padding = 4, indent_character = " ")
RSpec::Matchers.alias_matcher :include_gem, :include_gems

def have_lockfile(expected)
read_as(strip_whitespace(expected))
read_as(normalize_uri_file(strip_whitespace(expected)))
end

def plugin_should_be_installed(*names)
Expand All @@ -212,7 +212,7 @@ def plugin_should_not_be_installed(*names)
end

def lockfile_should_be(expected)
expect(bundled_app("Gemfile.lock")).to read_as(normalize_uri_file(strip_whitespace(expected)))
expect(bundled_app("Gemfile.lock")).to have_lockfile(expected)
end

def gemfile_should_be(expected)
Expand Down