From 73be5ed950f13715f5a2168875f9cc63ea051627 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Thu, 23 Feb 2017 06:07:53 +0100 Subject: Convert `brew pin` and `brew unpin` test to spec. --- Library/Homebrew/test/cmd/pin_spec.rb | 13 +++++++++++++ Library/Homebrew/test/cmd/unpin_spec.rb | 14 ++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 Library/Homebrew/test/cmd/pin_spec.rb create mode 100644 Library/Homebrew/test/cmd/unpin_spec.rb (limited to 'Library/Homebrew/test/cmd') diff --git a/Library/Homebrew/test/cmd/pin_spec.rb b/Library/Homebrew/test/cmd/pin_spec.rb new file mode 100644 index 000000000..9ffc052c3 --- /dev/null +++ b/Library/Homebrew/test/cmd/pin_spec.rb @@ -0,0 +1,13 @@ +describe "brew pin", :integration_test do + it "pins a Formula's version" do + setup_test_formula "testball" + (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath + + shutup do + expect { brew "pin", "testball" }.to be_a_success + expect { brew "upgrade" }.to be_a_success + end + + expect(HOMEBREW_CELLAR/"testball/0.1").not_to be_a_directory + end +end diff --git a/Library/Homebrew/test/cmd/unpin_spec.rb b/Library/Homebrew/test/cmd/unpin_spec.rb new file mode 100644 index 000000000..4f14626d8 --- /dev/null +++ b/Library/Homebrew/test/cmd/unpin_spec.rb @@ -0,0 +1,14 @@ +describe "brew unpin", :integration_test do + it "unpins a Formula's version" do + setup_test_formula "testball" + (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath + + shutup do + expect { brew "pin", "testball" }.to be_a_success + expect { brew "unpin", "testball" }.to be_a_success + expect { brew "upgrade" }.to be_a_success + end + + expect(HOMEBREW_CELLAR/"testball/0.1").to be_a_directory + end +end -- cgit v1.2.3