Class: Transpec::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/transpec/configuration.rb

Constant Summary collapse

NEGATIVE_FORMS_OF_TO =
['not_to', 'to_not'].freeze
PREDICATES =
[
  :convert_to_expect_to_matcher,
  :convert_to_expect_to_receive,
  :convert_to_allow_to_receive,
  :replace_deprecated_method,
  :parenthesize_matcher_arg
].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



22
23
24
25
26
27
28
# File 'lib/transpec/configuration.rb', line 22

def initialize
  PREDICATES.each do |predicate|
    instance_variable_set('@' + predicate.to_s, true)
  end

  self.negative_form_of_to = 'not_to'
end

Instance Attribute Details

#negative_form_of_toObject

Returns the value of attribute negative_form_of_to.



20
21
22
# File 'lib/transpec/configuration.rb', line 20

def negative_form_of_to
  @negative_form_of_to
end