class Transpec::Syntax::Double

Public Instance Methods

convert_to_double!() click to toggle source
# File lib/transpec/syntax/double.rb, line 15
def convert_to_double!
  return if method_name == :double
  replace(selector_range, 'double')
  add_record
end
dynamic_analysis_target?() click to toggle source
# File lib/transpec/syntax/double.rb, line 11
def dynamic_analysis_target?
  super && receiver_node.nil? && [:double, :mock, :stub].include?(method_name)
end

Private Instance Methods

add_record() click to toggle source
Calls superclass method Transpec::Syntax#add_record
# File lib/transpec/syntax/double.rb, line 23
def add_record
  super("#{method_name}('something')", "double('something')")
end