Separate and improve tests
This commit is contained in:
parent
a4020db526
commit
e733657f04
@ -8,11 +8,15 @@ describe "brew commands", :integration_test do
|
|||||||
.to output(/Built-in commands/).to_stdout
|
.to output(/Built-in commands/).to_stdout
|
||||||
.and not_to_output.to_stderr
|
.and not_to_output.to_stderr
|
||||||
.and be_a_success
|
.and be_a_success
|
||||||
|
end
|
||||||
|
|
||||||
|
it "prints a list without headers with the --quiet flag" do
|
||||||
|
expect { brew "commands", "--quiet" }
|
||||||
|
.to_not output(/Built-in commands/).to_stdout
|
||||||
|
|
||||||
expect { brew "commands", "--quiet" }
|
expect { brew "commands", "--quiet" }
|
||||||
.to output.to_stdout
|
.to be_a_success
|
||||||
.and not_to_output.to_stderr
|
.and not_to_output.to_stderr
|
||||||
.and be_a_success
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,18 @@
|
|||||||
require "cmd/info"
|
require "cmd/info"
|
||||||
|
|
||||||
describe "brew info", :integration_test do
|
describe "brew info", :integration_test do
|
||||||
it "prints information about a given Formula" do
|
before do
|
||||||
setup_test_formula "testball"
|
setup_test_formula "testball"
|
||||||
|
end
|
||||||
|
|
||||||
|
it "prints information about a given Formula" do
|
||||||
expect { brew "info", "testball" }
|
expect { brew "info", "testball" }
|
||||||
.to output(/testball: stable 0.1/).to_stdout
|
.to output(/testball: stable 0.1/).to_stdout
|
||||||
.and not_to_output.to_stderr
|
.and not_to_output.to_stderr
|
||||||
.and be_a_success
|
.and be_a_success
|
||||||
|
end
|
||||||
|
|
||||||
|
it "prints as json with the --json=v1 flag" do
|
||||||
expect { brew "info", "testball", "--json=v1" }
|
expect { brew "info", "testball", "--json=v1" }
|
||||||
.to output(/\{.+testball.+\}/).to_stdout
|
.to output(/\{.+testball.+\}/).to_stdout
|
||||||
.and not_to_output.to_stderr
|
.and not_to_output.to_stderr
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user