Class: OCRunner::TestCase

Inherits:
Object
  • Object
show all
Defined in:
lib/ocrunner/test_case.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ TestCase

Returns a new instance of TestCase.



10
11
12
13
14
# File 'lib/ocrunner/test_case.rb', line 10

def initialize(name)
  @name = name
  @errors = []
  @passed = true
end

Instance Attribute Details

#errorsObject

Returns the value of attribute errors.



8
9
10
# File 'lib/ocrunner/test_case.rb', line 8

def errors
  @errors
end

#nameObject (readonly)

Container for test case info



6
7
8
# File 'lib/ocrunner/test_case.rb', line 6

def name
  @name
end

#passedObject

Returns the value of attribute passed.



7
8
9
# File 'lib/ocrunner/test_case.rb', line 7

def passed
  @passed
end

Instance Method Details

#fail!Object



16
17
18
# File 'lib/ocrunner/test_case.rb', line 16

def fail!
  @passed = false
end

#passed?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/ocrunner/test_case.rb', line 20

def passed?
  @passed
end