Skip to content

Commit

Permalink
Fix Tests
Browse files Browse the repository at this point in the history
This fixes the broken tests and adds a new one.
  • Loading branch information
CryZe authored Mar 26, 2021
1 parent 01fc48f commit d0f4855
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
6 changes: 6 additions & 0 deletions cargo/spec/dependabot/cargo/file_parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,12 @@
end
end

context "with resolver version 2" do
let(:manifest_fixture_name) { "resolver2" }
let(:lockfile_fixture_name) { "no_dependencies" }
it { is_expected.to eq([]) }
end

context "with no dependencies" do
let(:manifest_fixture_name) { "no_dependencies" }
let(:lockfile_fixture_name) { "no_dependencies" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
# Test that the temporary path isn't included in the error message
expect(error.message).to_not include("dependabot_20")
expect(error.message).
to include("feature `namespaced-features` is required")
to include("feature `metabuild` is required")
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion cargo/spec/fixtures/manifests/disabled_feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "dependabot" # the name of the package
version = "0.1.0" # the current version, obeying semver
authors = ["[email protected]"]
namespaced-features = true
metabuild = ["foo", "bar"]

[dependencies]
time = "0.1.12"
Expand Down
4 changes: 2 additions & 2 deletions cargo/spec/fixtures/manifests/requires_nightly
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cargo-features = ["namespaced-features"]
cargo-features = ["metabuild"]

[package]
name = "dependabot" # the name of the package
version = "0.1.0" # the current version, obeying semver
authors = ["[email protected]"]
namespaced-features = true
metabuild = ["foo", "bar"]

[dependencies]
time = "0.1.12"
Expand Down
5 changes: 5 additions & 0 deletions cargo/spec/fixtures/manifests/resolver2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[package]
name = "dependabot" # the name of the package
version = "0.1.0" # the current version, obeying semver
authors = ["[email protected]"]
resolver = "2"

0 comments on commit d0f4855

Please sign in to comment.