Class: Transpec::SpecSuite
Instance Attribute Summary collapse
Instance Method Summary
collapse
#dispatch_node, #dispatch_syntax, #handler_names, #invoke_handler
Constructor Details
#initialize(base_paths = [], runtime_data = nil) ⇒ SpecSuite
Returns a new instance of SpecSuite.
15
16
17
18
19
|
# File 'lib/transpec/spec_suite.rb', line 15
def initialize(base_paths = [], runtime_data = nil)
@base_paths = base_paths
@runtime_data = runtime_data
@analyzed = false
end
|
Instance Attribute Details
#runtime_data ⇒ Object
Returns the value of attribute runtime_data.
13
14
15
|
# File 'lib/transpec/spec_suite.rb', line 13
def runtime_data
@runtime_data
end
|
Instance Method Details
#analyze ⇒ Object
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/transpec/spec_suite.rb', line 27
def analyze
return if @analyzed
specs.each do |spec|
next unless spec.ast
spec.ast.each_node do |node|
dispatch_node(node, nil, runtime_data)
end
end
@analyzed = true
end
|
#main_rspec_configure_node?(node) ⇒ Boolean
45
46
47
48
49
50
51
52
53
|
# File 'lib/transpec/spec_suite.rb', line 45
def main_rspec_configure_node?(node)
analyze
if @main_rspec_configure
@main_rspec_configure.node.equal?(node)
else
true
end
end
|
#need_to_modify_yield_receiver_to_any_instance_implementation_blocks_config? ⇒ Boolean
40
41
42
43
|
# File 'lib/transpec/spec_suite.rb', line 40
def need_to_modify_yield_receiver_to_any_instance_implementation_blocks_config?
analyze
@need_to_modify_yield_receiver_to_any_instance_implementation_blocks_config
end
|