From 2439df40592111a4480367dd988af213cabab70a Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Thu, 23 Feb 2017 06:04:47 +0100 Subject: Convert `brew home` test to spec. --- Library/Homebrew/test/cmd/home_spec.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Library/Homebrew/test/cmd/home_spec.rb (limited to 'Library/Homebrew/test/cmd') diff --git a/Library/Homebrew/test/cmd/home_spec.rb b/Library/Homebrew/test/cmd/home_spec.rb new file mode 100644 index 000000000..5a4070492 --- /dev/null +++ b/Library/Homebrew/test/cmd/home_spec.rb @@ -0,0 +1,17 @@ +describe "brew home", :integration_test do + it "opens the Homebrew homepage when no argument is given" do + expect { brew "home", "HOMEBREW_BROWSER" => "echo" } + .to output("#{HOMEBREW_WWW}\n").to_stdout + .and not_to_output.to_stderr + .and be_a_success + end + + it "opens the homepage for a given Formula" do + setup_test_formula "testball" + + expect { brew "home", "testball", "HOMEBREW_BROWSER" => "echo" } + .to output("#{Formula["testball"].homepage}\n").to_stdout + .and not_to_output.to_stderr + .and be_a_success + end +end -- cgit v1.2.3