Class: Protest::Test

Inherits:
Object
  • Object
show all
Defined in:
lib/protest/tests.rb

Overview

Encapsulates the relevant information about a test. Useful for certain reports.

Direct Known Subclasses

ErroredTest, FailedTest, PassedTest, PendingTest

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(test) ⇒ Test

:nodoc:



11
12
13
14
# File 'lib/protest/tests.rb', line 11

def initialize(test) #:nodoc:
  @test = test
  @test_name = test.name
end

Instance Attribute Details

#testObject (readonly)

Instance of the test case that was run.



6
7
8
# File 'lib/protest/tests.rb', line 6

def test
  @test
end

#test_nameObject (readonly)

Name of the test that passed. Useful for certain reports.



9
10
11
# File 'lib/protest/tests.rb', line 9

def test_name
  @test_name
end