Merge pull request #2136 from reitermarkus/spec-tap-new

Convert `brew tap-new` test to spec.
This commit is contained in:
Markus Reiter 2017-02-25 04:53:39 +01:00 committed by GitHub
commit 6709495a2a
2 changed files with 10 additions and 9 deletions

View File

@ -0,0 +1,10 @@
describe "brew tap-new", :integration_test do
it "initializes a new Tap with a ReadMe file" do
expect { brew "tap-new", "homebrew/foo", "--verbose" }
.to be_a_success
.and not_to_output.to_stdout
.and not_to_output.to_stderr
expect(HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-foo/README.md").to exist
end
end

View File

@ -1,9 +0,0 @@
require "testing_env"
class IntegrationCommandTestTapNew < IntegrationCommandTestCase
def test_tap_readme
assert_equal "", cmd("tap-new", "homebrew/foo", "--verbose")
readme = HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-foo/README.md"
assert readme.exist?, "The README should be created"
end
end