Skip to content

Commit 781b37b

Browse files
hsbtclaude
andcommitted
Adjust specs to plugin registration changes
Registering only the requested plugins restores the CLI argument order in the plugin index, matching the original expectation on master, and gemfile_install now reads plugin names from the DSL builder instead of the definition. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 52d68df commit 781b37b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

spec/bundler/plugin_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
end
125125

126126
it "doesn't calls installer without any plugins" do
127-
allow(definition).to receive(:dependencies) { [] }
127+
allow(builder).to receive(:dependencies) { [] }
128128
allow(installer).to receive(:install_definition).never
129129

130130
subject.gemfile_install(gemfile)
@@ -140,7 +140,7 @@
140140

141141
before do
142142
allow(index).to receive(:up_to_date?) { nil }
143-
allow(definition).to receive(:dependencies) { [Bundler::Dependency.new("new-plugin", ">=0", "plugin" => true), Bundler::Dependency.new("another-plugin", ">=0", "plugin" => true)] }
143+
allow(builder).to receive(:dependencies) { [Bundler::Dependency.new("new-plugin", ">=0", "plugin" => true), Bundler::Dependency.new("another-plugin", ">=0", "plugin" => true)] }
144144
allow(installer).to receive(:install_definition) { plugin_specs }
145145
end
146146

spec/plugins/list_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def exec(command, args)
5353
plugin_should_be_installed("foo", "bar")
5454
bundle "plugin list"
5555

56-
expected_output = "bar\n-----\n scream\n\nfoo\n-----\n shout"
56+
expected_output = "foo\n-----\n shout\n\nbar\n-----\n scream"
5757
expect(out).to include(expected_output)
5858
end
5959
end

0 commit comments

Comments
 (0)