Class: TestEnvironment::Assertions

Inherits:
Array
  • Object
show all
Defined in:
lib/test_env.rb

Instance Method Summary collapse

Instance Method Details

#call_allObject



37
38
39
# File 'lib/test_env.rb', line 37

def call_all
  each { |a| a.call }
end

#failed_countObject



33
34
35
# File 'lib/test_env.rb', line 33

def failed_count
  find_all { |a| a.failed? }.length
end

#inspectObject Also known as: to_s



41
42
43
# File 'lib/test_env.rb', line 41

def inspect
  collect.with_index { |assertion, i| "  #{i+1}) #{assertion.to_s}" }
end

#passed_countObject



29
30
31
# File 'lib/test_env.rb', line 29

def passed_count
  find_all { |a| a.passed? }.length
end