Module: Puppet::Pops::Types::TenseVariants
- Included in:
- Mismatch, TypeMismatchDescriber
- Defined in:
- lib/puppet/pops/types/type_mismatch_describer.rb
Overview
Module to handle present/past tense.
All method names prefixed with “it_” to avoid conflict with Mocha expectations. Adding a method named ‘expects’ just doesn’t work.
Instance Method Summary collapse
Instance Method Details
#it_does_not_expect(tense) ⇒ Object
90 91 92 93 94 95 96 97 |
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 90 def it_does_not_expect(tense) case tense when :present 'does not expect' else 'did not expect' end end |
#it_expects(tense) ⇒ Object
81 82 83 84 85 86 87 88 |
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 81 def it_expects(tense) case tense when :present 'expects' else 'expected' end end |
#it_has_no(tense) ⇒ Object
99 100 101 102 103 104 105 106 |
# File 'lib/puppet/pops/types/type_mismatch_describer.rb', line 99 def it_has_no(tense) case tense when :present 'has no' else 'did not have a' end end |