Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
melezhik opened this issue Sep 16, 2011 · 1 comment

Comments

@melezhik
Copy link

$ 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
@brianjolly
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants