netzpirat/guard-cucumber — Issue #19: It doesn't show the errors when :cli option is used
Author: restebanez
Created: 2011-10-12 21:36:16+00:00
State: open

Hi there,

When i use :cli option (no matter what options i specify), guard hides the cucumber errors and shows a "Done." instead

Guardfile with :cli
guard 'cucumber', :change_format => 'pretty', :cli => "--drb"

restebanez@Rodrigo-Estebanez-MacBook-Pro:~/agi [develop] guard
Please install rb-fsevent gem for Mac OSX FSEvents support
Using polling (Please help us to support your system better than that).
Guard is now watching at '/Users/restebanez/agi'
Starting Spork for RSpec & Cucumber
Using RSpec
Using Cucumber
Preloading Rails environment
Preloading Rails environment
Loading Spork.prefork block...
Loading Spork.prefork block...
Spork is ready and listening on 8989!
Spork is ready and listening on 8990!
Spork server for RSpec & Cucumber successfully started
Guard::RSpec is running, with RSpec 2!
Run Cucumber features features/app/app.feature
Using the default profile...
Running tests with args ["--require", "/Users/restebanez/.rvm/gems/ruby-1.9.2-p290@agi/gems/guard-cucumber-0.7.2/lib/guard/cucumber/notification_formatter.rb", "--format", "Guard::Cucumber::NotificationFormatter", "--out", "/dev/null", "--require", "features", "features/app/app.feature", "--format", "pretty", "--strict", "--tags", "~@wip", "--no-profile"]...
Disabling profiles...
Feature: Show App page
As a user
I want Agi to show me the configuration and status of an app

Background: # features/app/app.feature:5
Given an app exists # features/step_definitions/pickle_steps.rb:4

Scenario: Show an app that has never been deployed # features/app/app.feature:8
And I go to the app show page # features/step_definitions/web_steps.rb:49
Done.

If i removed the :cli option in my Guardfile, it shows things correctly:

restebanez@Rodrigo-Estebanez-MacBook-Pro:~/agi [develop] guard
Please install rb-fsevent gem for Mac OSX FSEvents support
Using polling (Please help us to support your system better than that).
Guard is now watching at '/Users/restebanez/agi'
Starting Spork for RSpec & Cucumber
Using RSpec
Using Cucumber
Preloading Rails environment
Preloading Rails environment
Loading Spork.prefork block...
Loading Spork.prefork block...
Spork is ready and listening on 8989!
Spork is ready and listening on 8990!
Spork server for RSpec & Cucumber successfully started
Guard::RSpec is running, with RSpec 2!
Run Cucumber features features/app/app.feature
Disabling profiles...
Feature: Show App page
As a user
I want Agi to show me the configuration and status of an app

Background: # features/app/app.feature:5
Given an app exists # features/step_definitions/pickle_steps.rb:4

Scenario: Show an app that has never been deployed # features/app/app.feature:8
And I go to the app show page # features/step_definitions/web_steps.rb:49
Could not figure out a path for ["the app"] {:extra=>"show"} (RuntimeError)
./features/support/paths.rb:41:in `path_to'
./features/step_definitions/web_steps.rb:50:in `/^(?:|I )go to (.+)$/'
features/app/app.feature:9:in `And I go to the app show page'
Then I should see "Undeployed changes" alert # features/app/app.feature:10
Undefined step: "I should see "Undeployed changes" alert" (Cucumber::Undefined)
features/app/app.feature:10:in `Then I should see "Undeployed changes" alert'

Failing Scenarios:
cucumber features/app/app.feature:8 # Scenario: Show an app that has never been deployed

1 scenario (1 failed)
3 steps (1 failed, 1 undefined, 1 passed)
0m1.453s

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

Then /^I should see "([^"]*)" alert$/ do |arg1|
pending # express the regexp above with the code you wish you had
end

Thanks!