cucumber-nagios icon indicating copy to clipboard operation
cucumber-nagios copied to clipboard

cucumber-nagios don't find steps defenintions when run with absolute path to features dir

Open melezhik opened this issue 14 years ago • 1 comments

$ cd /home/melezhik/repos/SandBox/trunk/melezhik/cucumber
$ cucumber-nagios-gen project google.ru
$ cd google.ru
$ bundle install
$ cucumber-nagios-gen feature google.ru bidding
$ cucumber-nagios features/google.ru/bidding.feature --pretty

    Feature: google.ru
      It should be up

      Scenario: Visiting home page      # features/google.ru/bidding.feature:4
        When I go to "http://google.ru" # features/steps/http_steps.rb:11
        Then the request should succeed # features/steps/http_steps.rb:64

    1 scenario (1 passed)
    2 steps (2 passed)
    0m0.432s

when run the same in `absolute' flavour I have :

    $ cd   
    $ cucumber-nagios /home/melezhik/repos/SandBox/trunk/melezhik/cucumber/google.ru/features/google.ru/bidding.feature --pretty --debug

cucumber --format pretty /home/melezhik/repos/SandBox/trunk/melezhik/cucumber/google.ru/features google.ru/bidding.feature



    Feature: google.ru
      It should be up

      Scenario: Visiting home page      # /home/melezhik/repos/SandBox/trunk/melezhik/cucumber/google.ru/features/google.ru/bidding.feature:4
        When I go to "http://google.ru" # /home/melezhik/repos/SandBox/trunk/melezhik/cucumber/google.ru/features/google.ru/bidding.feature:5
        Then the request should succeed # /home/melezhik/repos/SandBox/trunk/melezhik/cucumber/google.ru/features/google.ru/bidding.feature:6

    1 scenario (1 undefined)
    2 steps (2 undefined)
    0m0.002s

    You can implement step definitions for undefined steps with these snippets:

    When /^I go to "([^"]*)"$/ do |arg1|
      pending # express the regexp above with the code you wish you had
    end

    Then /^the request should succeed$/ do
      pending # express the regexp above with the code you wish you had
    end

melezhik avatar Sep 16 '11 10:09 melezhik

Try requiring the features directory.

This is what worked for me: cucumber --format Cucumber::Formatter::Nagios --require /path/to/features /path/to/features/project/some.feature

brianjolly avatar Oct 15 '11 01:10 brianjolly