Merge pull request #2164 from reitermarkus/spec-bundle
Convert `brew bundle` test to spec.
This commit is contained in:
commit
3470edd615
@ -1,22 +0,0 @@
|
|||||||
require "testing_env"
|
|
||||||
|
|
||||||
class IntegrationCommandTestBundle < IntegrationCommandTestCase
|
|
||||||
def test_bundle
|
|
||||||
needs_test_cmd_taps
|
|
||||||
setup_remote_tap("homebrew/bundle")
|
|
||||||
HOMEBREW_REPOSITORY.cd do
|
|
||||||
shutup do
|
|
||||||
system "git", "init"
|
|
||||||
system "git", "commit", "--allow-empty", "-m", "This is a test commit"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
mktmpdir do |path|
|
|
||||||
FileUtils.touch "#{path}/Brewfile"
|
|
||||||
Dir.chdir path do
|
|
||||||
assert_equal "The Brewfile's dependencies are satisfied.",
|
|
||||||
cmd("bundle", "check")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
24
Library/Homebrew/test/cmd/bundle_spec.rb
Normal file
24
Library/Homebrew/test/cmd/bundle_spec.rb
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
describe "brew bundle", :integration_test, :needs_test_cmd_taps do
|
||||||
|
describe "check" do
|
||||||
|
it "checks if a Brewfile's dependencies are satisfied" do
|
||||||
|
setup_remote_tap "homebrew/bundle"
|
||||||
|
|
||||||
|
HOMEBREW_REPOSITORY.cd do
|
||||||
|
shutup do
|
||||||
|
system "git", "init"
|
||||||
|
system "git", "commit", "--allow-empty", "-m", "This is a test commit"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
Dir.mktmpdir do |path|
|
||||||
|
FileUtils.touch "#{path}/Brewfile"
|
||||||
|
Dir.chdir path do
|
||||||
|
expect { brew "bundle", "check" }
|
||||||
|
.to output("The Brewfile's dependencies are satisfied.\n").to_stdout
|
||||||
|
.and not_to_output.to_stderr
|
||||||
|
.and be_a_success
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user