Skip to content

Commit

Permalink
Clean up options setting in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brrygrdn committed Apr 6, 2021
1 parent ffcc1ac commit c325d57
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 17 deletions.
1 change: 0 additions & 1 deletion bundler/lib/dependabot/bundler/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ module Helpers

BUNDLER_MAJOR_VERSION_REGEX = /BUNDLED WITH\s+(?<version>\d+)\./m.freeze

# NOTE: options is a manditory argument to ensure we pass it from all calling classes
def self.bundler_version(lockfile)
return DEFAULT unless lockfile

Expand Down
3 changes: 1 addition & 2 deletions bundler/spec/dependabot/bundler/file_parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
described_class.new(
dependency_files: dependency_files,
source: source,
reject_external_code: reject_external_code,
options: { bundler_2_available: PackageManagerHelper.use_bundler_2? }
reject_external_code: reject_external_code
)
end
let(:source) do
Expand Down
5 changes: 1 addition & 4 deletions bundler/spec/dependabot/bundler/file_updater_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@
"type" => "git_source",
"host" => "github.com"
}],
repo_contents_path: repo_contents_path,
options: {
bundler_2_available: PackageManagerHelper.use_bundler_2?
}
repo_contents_path: repo_contents_path
)
end
let(:dependencies) { [dependency] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"username" => "x-access-token",
"password" => "token"
}],
options: { bundler_2_available: PackageManagerHelper.use_bundler_2? }
options: {}
)
end
let(:dependency_files) do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"username" => "x-access-token",
"password" => "token"
}],
options: { bundler_2_available: PackageManagerHelper.use_bundler_2? }
options: {}
)
end
let(:dependency_files) { bundler_project_dependency_files("gemfile") }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
"username" => "x-access-token",
"password" => "token"
}],
options: {
bundler_2_available: PackageManagerHelper.use_bundler_2?
}
options: {}
)
end
let(:dependency_files) { bundler_project_dependency_files("gemfile") }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}],
unlock_requirement: unlock_requirement,
latest_allowable_version: latest_allowable_version,
options: { bundler_2_available: PackageManagerHelper.use_bundler_2? }
options: {}
)
end
let(:ignored_versions) { [] }
Expand Down
5 changes: 1 addition & 4 deletions bundler/spec/dependabot/bundler/update_checker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
dependency_files: dependency_files,
credentials: credentials,
ignored_versions: ignored_versions,
security_advisories: security_advisories,
options: {
bundler_2_available: PackageManagerHelper.use_bundler_2?
}
security_advisories: security_advisories
)
end
let(:credentials) do
Expand Down

0 comments on commit c325d57

Please sign in to comment.