Class: Transpec::Configuration
- Inherits:
-
Object
- Object
- Transpec::Configuration
- Defined in:
- lib/transpec/configuration.rb
Constant Summary collapse
- NEGATIVE_FORMS_OF_TO =
['not_to', 'to_not'].freeze
- FORMS_OF_BE_FALSEY =
['be_falsey', 'be_falsy'].freeze
- BOOLEAN_MATCHER_TYPES =
[:conditional, :exact].freeze
- PREDICATES =
[ [:convert_should, true], [:convert_oneliner, true], [:convert_should_receive, true], [:convert_stub, true], [:convert_have_items, true], [:convert_its, true], [:convert_deprecated_method, true], [:parenthesize_matcher_arg, true], [:forced, false], [:skip_dynamic_analysis, false] ].freeze
Instance Attribute Summary collapse
-
#boolean_matcher_type ⇒ Object
Returns the value of attribute boolean_matcher_type.
-
#form_of_be_falsey ⇒ Object
Returns the value of attribute form_of_be_falsey.
-
#negative_form_of_to ⇒ Object
Returns the value of attribute negative_form_of_to.
-
#rspec_command ⇒ Object
Returns the value of attribute rspec_command.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
29 30 31 32 33 34 35 36 37 |
# File 'lib/transpec/configuration.rb', line 29 def initialize PREDICATES.each do |predicate, default_value| instance_variable_set('@' + predicate.to_s, default_value) end self.negative_form_of_to = 'not_to' self.boolean_matcher_type = :conditional self.form_of_be_falsey = 'be_falsey' end |
Instance Attribute Details
#boolean_matcher_type ⇒ Object
Returns the value of attribute boolean_matcher_type.
27 28 29 |
# File 'lib/transpec/configuration.rb', line 27 def boolean_matcher_type @boolean_matcher_type end |
#form_of_be_falsey ⇒ Object
Returns the value of attribute form_of_be_falsey.
27 28 29 |
# File 'lib/transpec/configuration.rb', line 27 def form_of_be_falsey @form_of_be_falsey end |
#negative_form_of_to ⇒ Object
Returns the value of attribute negative_form_of_to.
27 28 29 |
# File 'lib/transpec/configuration.rb', line 27 def negative_form_of_to @negative_form_of_to end |
#rspec_command ⇒ Object
Returns the value of attribute rspec_command.
27 28 29 |
# File 'lib/transpec/configuration.rb', line 27 def rspec_command @rspec_command end |