Skip to content

Commit

Permalink
Add tests for --all-platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
SeekingMeaning committed Nov 11, 2020
1 parent 03c21c4 commit 1b4f7a2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions bundler/spec/commands/binstubs_spec.rb
Expand Up @@ -51,6 +51,18 @@
expect(bundled_app("bin/rake")).to exist
end

it "allows installing binstubs for all platforms" do
install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem "rack"
G

bundle "binstubs rack --all-platforms"

expect(bundled_app("bin/rackup")).to exist
expect(bundled_app("bin/rackup.cmd")).to exist
end

it "displays an error when used without any gem" do
install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
Expand Down Expand Up @@ -356,6 +368,14 @@
expect(bundled_app("foo/rackup")).to exist
end
end

context "when specified --all-platforms option" do
it "generates standalone binstubs for all platforms" do
bundle "binstubs rack --standalone --all-platforms"
expect(bundled_app("bin/rackup")).to exist
expect(bundled_app("bin/rackup.cmd")).to exist
end
end
end

context "when the bin already exists" do
Expand Down

0 comments on commit 1b4f7a2

Please sign in to comment.