Sha256: c16bb9a75f3b46c2d00489e956a4b66a4fc61294360f85b995574c1c98d6c143

Contents?: true

Size: 940 Bytes

Versions: 2

Compression:

Stored size: 940 Bytes

Contents

module CommandUnit
	class Totaliser
		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

		def scenario_run
			@scenarios_run += 1
		end

		def scenario_pass
			@scenarios_passed += 1
		end

		def scenario_fail
			@scenarios_failed += 1
		end

		def test_run
			@tests_run += 1
		end

		def test_pass
			@tests_passed += 1
		end

		def test_fail
			@tests_failed += 1
		end

		def expectation_run
			@expectations_run += 1
		end

		def expectation_pass
			@expectations_passed += 1
		end

		def expectation_fail
			@expectations_failed += 1
		end

		attr_reader :scenarios_run, :scenarios_passed, :scenarios_failed,
		            :tests_run, :tests_passed, :tests_failed,
		            :expectations_run, :expectations_passed, :expectations_failed
	end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
command-unit-0.0.3 lib/command-unit/totaliser.rb
command-unit-0.0.2 lib/command-unit/totaliser.rb