aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/cask/dsl_spec.rb5
-rw-r--r--Library/Homebrew/test/support/helper/output_as_tty.rb4
2 files changed, 5 insertions, 4 deletions
diff --git a/Library/Homebrew/test/cask/dsl_spec.rb b/Library/Homebrew/test/cask/dsl_spec.rb
index a17acfca6..cd296b5ab 100644
--- a/Library/Homebrew/test/cask/dsl_spec.rb
+++ b/Library/Homebrew/test/cask/dsl_spec.rb
@@ -232,8 +232,9 @@ describe Hbc::DSL, :cask do
expect(cask.caveats).to be_empty
cask = Hbc::Cask.new("cask-with-caveats") do
- def caveats; <<~EOS
- When you install this Cask, you probably want to know this.
+ def caveats
+ <<~EOS
+ When you install this Cask, you probably want to know this.
EOS
end
end
diff --git a/Library/Homebrew/test/support/helper/output_as_tty.rb b/Library/Homebrew/test/support/helper/output_as_tty.rb
index aa9da73cc..22f96510e 100644
--- a/Library/Homebrew/test/support/helper/output_as_tty.rb
+++ b/Library/Homebrew/test/support/helper/output_as_tty.rb
@@ -19,7 +19,7 @@ module Test
return super(block) unless @tty
colored_tty_block = lambda do
- instance_eval("$#{@output}").extend(Module.new do
+ instance_eval("$#{@output}", __FILE__, __LINE__).extend(Module.new do
def tty?
true
end
@@ -32,7 +32,7 @@ module Test
return super(colored_tty_block) if @colors
uncolored_tty_block = lambda do
- instance_eval <<-EOS
+ instance_eval <<-EOS, __FILE__, __LINE__ + 1
begin
captured_stream = StringIO.new