Class: Protest::TestCase::TestWrapper
- Inherits:
-
Object
- Object
- Protest::TestCase::TestWrapper
- Defined in:
- lib/protest/test_case.rb
Overview
Provides the TestCase API for global setup/teardown blocks, so they can be “faked” as tests into the reporter (they aren’t counted towards the total number of tests but they could count towards the number of failures/errors.)
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
:nodoc:.
Instance Method Summary collapse
- #context_description ⇒ Object
-
#initialize(type, test_case) ⇒ TestWrapper
constructor
A new instance of TestWrapper.
- #run(report) ⇒ Object
Constructor Details
#initialize(type, test_case) ⇒ TestWrapper
Returns a new instance of TestWrapper.
250 251 252 253 254 |
# File 'lib/protest/test_case.rb', line 250 def initialize(type, test_case) @type = type @test = test_case @name = "Global #{@type} for #{test_case.description}" end |
Instance Attribute Details
#name ⇒ Object (readonly)
:nodoc:
248 249 250 |
# File 'lib/protest/test_case.rb', line 248 def name @name end |
Instance Method Details
#context_description ⇒ Object
260 261 262 |
# File 'lib/protest/test_case.rb', line 260 def context_description @test.description end |
#run(report) ⇒ Object
256 257 258 |
# File 'lib/protest/test_case.rb', line 256 def run(report) @test.send("do_global_#{@type}") end |