Class: Transpec::Syntax::Example

Inherits:
Syntax
  • Object
show all
Includes:
RSpecDSL, Mixin::ContextSensitive, Mixin::Examplish, Mixin::Metadata
Defined in:
lib/transpec/syntax/example.rb

Constant Summary

Constants included from RSpecDSL

RSpecDSL::EXAMPLE_GROUP_METHODS, RSpecDSL::EXAMPLE_METHODS, RSpecDSL::HELPER_METHODS, RSpecDSL::HOOK_METHODS

Instance Method Summary collapse

Methods included from Mixin::ContextSensitive

#conversion_target?

Methods included from Mixin::Send

#arg_node, #arg_nodes, #arg_range, #args_range, #method_name, #parentheses_range, #range_after_arg, #range_in_between_receiver_and_selector, #range_in_between_selector_and_arg, #receiver_node, #receiver_range, #selector_range

Methods included from Mixin::Send::TargetDetection

#conversion_target?

Methods included from Mixin::Examplish

#block_node, #insert_description!

Methods included from Mixin::BlockOwner

#block_base_indentation, #block_beginning_line, #block_body_line, #block_body_node, #block_body_range, #block_end_line, #block_has_body?, #convert_singleline_block_to_multiline!, #range_between_block_begin_and_body, #range_between_block_body_and_end

Methods included from Mixin::Metadata

#metadata_key_nodes, #metadata_nodes

Instance Method Details

#convert_pending_to_skip! ⇒ Object



22
23
24
25
# File 'lib/transpec/syntax/example.rb', line 22

def convert_pending_to_skip!
  convert_pending_selector_to_skip!
  
end

#description? ⇒ Boolean

Returns:



27
28
29
# File 'lib/transpec/syntax/example.rb', line 27

def description?
  !arg_node.nil?
end

#dynamic_analysis_target? ⇒ Boolean

Returns:



14
15
16
# File 'lib/transpec/syntax/example.rb', line 14

def dynamic_analysis_target?
  super && receiver_node.nil? && EXAMPLE_METHODS.include?(method_name)
end

#should_be_in_example_group_context? ⇒ Boolean

Returns:



18
19
20
# File 'lib/transpec/syntax/example.rb', line 18

def should_be_in_example_group_context?
  true
end