Class: Transpec::Config
- Inherits:
-
Object
- Object
- Transpec::Config
- Defined in:
- lib/transpec/config.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 =
[ [:forced, false], [:convert_should, true], [:convert_oneliner, true], [:convert_should_receive, true], [:convert_stub, true], [:convert_have_items, true], [:convert_its, true], [:convert_pending, true], [:convert_deprecated_method, true], [:convert_example_group, false], [:convert_hook_scope, false], [:convert_stub_with_hash_to_allow_to_receive_and_return, false], [:skip_dynamic_analysis, false], [:add_receiver_arg_to_any_instance_implementation_block, true], [:add_explicit_type_metadata_to_example_group, true], [:parenthesize_matcher_arg, true] ].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 ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
35 36 37 38 39 40 41 42 43 |
# File 'lib/transpec/config.rb', line 35 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.
33 34 35 |
# File 'lib/transpec/config.rb', line 33 def boolean_matcher_type @boolean_matcher_type end |
#form_of_be_falsey ⇒ Object
Returns the value of attribute form_of_be_falsey.
33 34 35 |
# File 'lib/transpec/config.rb', line 33 def form_of_be_falsey @form_of_be_falsey end |
#negative_form_of_to ⇒ Object
Returns the value of attribute negative_form_of_to.
33 34 35 |
# File 'lib/transpec/config.rb', line 33 def negative_form_of_to @negative_form_of_to end |
#rspec_command ⇒ Object
Returns the value of attribute rspec_command.
33 34 35 |
# File 'lib/transpec/config.rb', line 33 def rspec_command @rspec_command end |