Convert brew cat
test to spec.
This commit is contained in:
parent
c7121f6be5
commit
d914c41b9d
@ -1,8 +0,0 @@
|
|||||||
require "testing_env"
|
|
||||||
|
|
||||||
class IntegrationCommandTestCat < IntegrationCommandTestCase
|
|
||||||
def test_cat
|
|
||||||
formula_file = setup_test_formula "testball"
|
|
||||||
assert_equal formula_file.read.chomp, cmd("cat", "testball")
|
|
||||||
end
|
|
||||||
end
|
|
11
Library/Homebrew/test/cmd/cat_spec.rb
Normal file
11
Library/Homebrew/test/cmd/cat_spec.rb
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
describe "brew cat", :integration_test do
|
||||||
|
it "prints the content of a given Formula" do
|
||||||
|
formula_file = setup_test_formula "testball"
|
||||||
|
content = formula_file.read
|
||||||
|
|
||||||
|
expect { brew "cat", "testball" }
|
||||||
|
.to output(content).to_stdout
|
||||||
|
.and not_to_output.to_stderr
|
||||||
|
.and be_a_success
|
||||||
|
end
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user