scope 0.2 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/scope.rb +9 -3
- data/scope.gemspec +2 -2
- metadata +3 -2
data/lib/scope.rb
CHANGED
@@ -47,7 +47,7 @@ module Scope
|
|
47
47
|
@focus_next_test = false
|
48
48
|
end
|
49
49
|
|
50
|
-
context_name = @contexts[1..-1].map
|
50
|
+
context_name = @contexts[1..-1].map { |context| context.name }.join(" ")
|
51
51
|
context_name += " " unless context_name.empty?
|
52
52
|
test_method_name = "#{context_name}should #{name}"
|
53
53
|
define_method test_method_name, block
|
@@ -79,8 +79,14 @@ module Scope
|
|
79
79
|
test_name = self.__name__
|
80
80
|
context = self.class.context_for_test[test_name]
|
81
81
|
result = nil
|
82
|
-
|
83
|
-
|
82
|
+
begin
|
83
|
+
# Unit::TestCase's implementation of run() invokes the test method with exception handling.
|
84
|
+
context.run_setup_and_teardown(self, test_name) { result = super }
|
85
|
+
rescue *MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
|
86
|
+
raise
|
87
|
+
rescue Exception => error
|
88
|
+
result = test_runner.puke(self.class, self.__name__, error)
|
89
|
+
end
|
84
90
|
result
|
85
91
|
end
|
86
92
|
end
|
data/scope.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "scope"
|
3
|
-
s.version = "0.2"
|
3
|
+
s.version = "0.2.1"
|
4
4
|
|
5
5
|
s.required_rubygems_version = Gem::Requirement.new(">=0") if s.respond_to? :required_rubygems_version=
|
6
6
|
s.specification_version = 2 if s.respond_to? :specification_version=
|
@@ -18,4 +18,4 @@ Gem::Specification.new do |s|
|
|
18
18
|
lib/scope.rb
|
19
19
|
)
|
20
20
|
s.add_dependency("minitest")
|
21
|
-
end
|
21
|
+
end
|
metadata
CHANGED