aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/test/support/shared_examples.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cask/test/support/shared_examples.rb')
-rw-r--r--Library/Homebrew/cask/test/support/shared_examples.rb18
1 files changed, 11 insertions, 7 deletions
diff --git a/Library/Homebrew/cask/test/support/shared_examples.rb b/Library/Homebrew/cask/test/support/shared_examples.rb
index e846af404..594ca81c1 100644
--- a/Library/Homebrew/cask/test/support/shared_examples.rb
+++ b/Library/Homebrew/cask/test/support/shared_examples.rb
@@ -5,14 +5,18 @@ MiniTest::Spec.class_eval do
end
end
-module MiniTest::Spec::SharedExamples
- def shared_examples_for(desc, &block)
- MiniTest::Spec.shared_examples[desc] = block
- end
+module MiniTest
+ class Spec
+ module SharedExamples
+ def shared_examples_for(desc, &block)
+ MiniTest::Spec.shared_examples[desc] = block
+ end
- def it_behaves_like(desc, *args, &block)
- instance_exec(*args, &MiniTest::Spec.shared_examples[desc])
- instance_eval(&block) if block_given?
+ def it_behaves_like(desc, *args, &block)
+ instance_exec(*args, &MiniTest::Spec.shared_examples[desc])
+ instance_eval(&block) if block_given?
+ end
+ end
end
end