Class: CukeTest::CucumberMatchers::FailCuke
- Inherits:
-
Object
- Object
- CukeTest::CucumberMatchers::FailCuke
- Defined in:
- lib/cuke-test/cucumber_matchers.rb
Instance Method Summary collapse
- #failure_message ⇒ Object
-
#initialize(step = nil) ⇒ FailCuke
constructor
A new instance of FailCuke.
- #matches?(target) ⇒ Boolean
- #negative_failure_message ⇒ Object
Constructor Details
#initialize(step = nil) ⇒ FailCuke
Returns a new instance of FailCuke.
29 30 31 |
# File 'lib/cuke-test/cucumber_matchers.rb', line 29 def initialize(step = nil) @step = step end |
Instance Method Details
#failure_message ⇒ Object
39 40 41 |
# File 'lib/cuke-test/cucumber_matchers.rb', line 39 def ('to fail') end |
#matches?(target) ⇒ Boolean
33 34 35 36 37 |
# File 'lib/cuke-test/cucumber_matchers.rb', line 33 def matches?(target) @target = target target.match(/[0-9]+ scenarios? \([0-9]+ failed(, [0-9]+ passed)?\)/) and (@step.nil? or target.match(/in `#{@step}'/)) end |
#negative_failure_message ⇒ Object
43 44 45 |
# File 'lib/cuke-test/cucumber_matchers.rb', line 43 def ('not to fail') end |