aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/bash_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/test/bash_spec.rb')
-rw-r--r--Library/Homebrew/test/bash_spec.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/Library/Homebrew/test/bash_spec.rb b/Library/Homebrew/test/bash_spec.rb
index 1b0f15066..552607810 100644
--- a/Library/Homebrew/test/bash_spec.rb
+++ b/Library/Homebrew/test/bash_spec.rb
@@ -1,20 +1,20 @@
require "open3"
-RSpec::Matchers.define :have_valid_bash_syntax do
- match do |file|
- stdout, stderr, status = Open3.capture3("/bin/bash", "-n", file)
+describe "Bash" do
+ matcher :have_valid_bash_syntax do
+ match do |file|
+ stdout, stderr, status = Open3.capture3("/bin/bash", "-n", file)
- @actual = [file, stderr]
+ @actual = [file, stderr]
- stdout.empty? && status.success?
- end
+ stdout.empty? && status.success?
+ end
- failure_message do |(file, stderr)|
- "expected that #{file} is a valid Bash file:\n#{stderr}"
+ failure_message do |(file, stderr)|
+ "expected that #{file} is a valid Bash file:\n#{stderr}"
+ end
end
-end
-describe "Bash" do
context "brew" do
subject { HOMEBREW_LIBRARY_PATH.parent.parent/"bin/brew" }
it { is_expected.to have_valid_bash_syntax }