Class: CommandUnit::Totaliser

Inherits:
Object
  • Object
show all
Defined in:
lib/command-unit/totaliser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTotaliser

Returns a new instance of Totaliser.



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/command-unit/totaliser.rb', line 3

def initialize
  @scenarios_run = 0
  @scenarios_passed = 0
  @scenarios_failed = 0
  @tests_run = 0
  @tests_passed = 0
  @tests_failed = 0
  @expectations_run = 0
  @expectations_passed = 0
  @expectations_failed = 0
end

Instance Attribute Details

#expectations_failedObject (readonly)

Returns the value of attribute expectations_failed.



51
52
53
# File 'lib/command-unit/totaliser.rb', line 51

def expectations_failed
  @expectations_failed
end

#expectations_passedObject (readonly)

Returns the value of attribute expectations_passed.



51
52
53
# File 'lib/command-unit/totaliser.rb', line 51

def expectations_passed
  @expectations_passed
end

#expectations_runObject (readonly)

Returns the value of attribute expectations_run.



51
52
53
# File 'lib/command-unit/totaliser.rb', line 51

def expectations_run
  @expectations_run
end

#scenarios_failedObject (readonly)

Returns the value of attribute scenarios_failed.



51
52
53
# File 'lib/command-unit/totaliser.rb', line 51

def scenarios_failed
  @scenarios_failed
end

#scenarios_passedObject (readonly)

Returns the value of attribute scenarios_passed.



51
52
53
# File 'lib/command-unit/totaliser.rb', line 51

def scenarios_passed
  @scenarios_passed
end

#scenarios_runObject (readonly)

Returns the value of attribute scenarios_run.



51
52
53
# File 'lib/command-unit/totaliser.rb', line 51

def scenarios_run
  @scenarios_run
end

#tests_failedObject (readonly)

Returns the value of attribute tests_failed.



51
52
53
# File 'lib/command-unit/totaliser.rb', line 51

def tests_failed
  @tests_failed
end

#tests_passedObject (readonly)

Returns the value of attribute tests_passed.



51
52
53
# File 'lib/command-unit/totaliser.rb', line 51

def tests_passed
  @tests_passed
end

#tests_runObject (readonly)

Returns the value of attribute tests_run.



51
52
53
# File 'lib/command-unit/totaliser.rb', line 51

def tests_run
  @tests_run
end

Instance Method Details

#expectation_failObject



47
48
49
# File 'lib/command-unit/totaliser.rb', line 47

def expectation_fail
  @expectations_failed += 1
end

#expectation_passObject



43
44
45
# File 'lib/command-unit/totaliser.rb', line 43

def expectation_pass
  @expectations_passed += 1
end

#expectation_runObject



39
40
41
# File 'lib/command-unit/totaliser.rb', line 39

def expectation_run
  @expectations_run += 1
end

#scenario_failObject



23
24
25
# File 'lib/command-unit/totaliser.rb', line 23

def scenario_fail
  @scenarios_failed += 1
end

#scenario_passObject



19
20
21
# File 'lib/command-unit/totaliser.rb', line 19

def scenario_pass
  @scenarios_passed += 1
end

#scenario_runObject



15
16
17
# File 'lib/command-unit/totaliser.rb', line 15

def scenario_run
  @scenarios_run += 1
end

#test_failObject



35
36
37
# File 'lib/command-unit/totaliser.rb', line 35

def test_fail
  @tests_failed += 1
end

#test_passObject



31
32
33
# File 'lib/command-unit/totaliser.rb', line 31

def test_pass
  @tests_passed += 1
end

#test_runObject



27
28
29
# File 'lib/command-unit/totaliser.rb', line 27

def test_run
  @tests_run += 1
end