Class: JSTestSan::TestCase::Test

Inherits:
Object
  • Object
show all
Defined in:
lib/js_test_san/test.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(test_case, name, state, output) ⇒ Test

Returns a new instance of Test.



6
7
8
# File 'lib/js_test_san/test.rb', line 6

def initialize(test_case, name, state, output)
  @test_case, @name, @state, @output = test_case, name, state, output
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/js_test_san/test.rb', line 4

def name
  @name
end

#outputObject (readonly)

Returns the value of attribute output.



4
5
6
# File 'lib/js_test_san/test.rb', line 4

def output
  @output
end

#stateObject (readonly)

Returns the value of attribute state.



4
5
6
# File 'lib/js_test_san/test.rb', line 4

def state
  @state
end

#test_caseObject (readonly)

Returns the value of attribute test_case.



4
5
6
# File 'lib/js_test_san/test.rb', line 4

def test_case
  @test_case
end

Instance Method Details

#to_sObject



10
11
12
13
14
# File 'lib/js_test_san/test.rb', line 10

def to_s
%{#{@state.to_s.capitalize}:
#{@name} (#{@test_case.title}) [#{@test_case.html_file}]:
#{@output}}
end