Class: RailsProof::TestInspector

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_proof/test_inspector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source) ⇒ TestInspector

Returns a new instance of TestInspector.



5
6
7
# File 'lib/rails_proof/test_inspector.rb', line 5

def initialize(source)
  @source = source
end

Instance Attribute Details

#sourceObject (readonly)

Returns the value of attribute source.



3
4
5
# File 'lib/rails_proof/test_inspector.rb', line 3

def source
  @source
end

Instance Method Details

#countObject



13
14
15
# File 'lib/rails_proof/test_inspector.rb', line 13

def count
  test_cases.count
end

#empty?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/rails_proof/test_inspector.rb', line 17

def empty?
  test_cases.empty?
end

#test_casesObject



9
10
11
# File 'lib/rails_proof/test_inspector.rb', line 9

def test_cases
  @test_cases ||= rails_style_tests + method_style_tests
end