Class: DontRepeatYourself::UnitTestingHelpers::RSpecMatchers::BeDRYMatcher
- Inherits:
-
Object
- Object
- DontRepeatYourself::UnitTestingHelpers::RSpecMatchers::BeDRYMatcher
- Defined in:
- lib/dont_repeat_yourself/unit_testing_helpers.rb
Instance Method Summary collapse
- #description ⇒ Object
- #failure_message ⇒ Object
- #matches?(project) ⇒ Boolean
-
#negative_failure_message ⇒ Object
TODO Do we really need this? It does not make a lot of sense.
Instance Method Details
#description ⇒ Object
48 49 50 |
# File 'lib/dont_repeat_yourself/unit_testing_helpers.rb', line 48 def description "follow the 'Don't Repeat Yourself' principle " << @project.description end |
#failure_message ⇒ Object
52 53 54 |
# File 'lib/dont_repeat_yourself/unit_testing_helpers.rb', line 52 def @project. end |
#matches?(project) ⇒ Boolean
38 39 40 41 |
# File 'lib/dont_repeat_yourself/unit_testing_helpers.rb', line 38 def matches?(project) @project = project @project.is_dry? end |
#negative_failure_message ⇒ Object
TODO Do we really need this? It does not make a lot of sense
44 45 46 |
# File 'lib/dont_repeat_yourself/unit_testing_helpers.rb', line 44 def "expected #{@project.name} to have more than #{@project.maximum_number_of_duplicate_lines_i_want_in_my_project} duplicate lines :\n but found the following:\n " end |