Closed restebanez closed 13 years ago
When you remove the :cli option from your guard, then the default :cli option is used:
:cli => '--no-profile --color --format progress --strict'
which seems to be fine. Try appending your :cli option to it:
:cli => '--no-profile --color --format progress --strict --drb'
Another user had to explicit add another require to get it running, but other didn't:
:cli => '--no-profile --color --format progress --strict --drb --require features/'
Thanks Netzpirat!
The first option works fine but the last two still hide the error part, unfortunately i have to use --drb because i use fork.
Thanks
I don't have an active project with Cucumber, so I'm unable to play with configuration settings. Please have a look at https://github.com/netzpirat/guard-cucumber/blob/master/lib/guard/cucumber/runner.rb#L38, there you see how the Cucumber command is composed.
I'd try first to get it up and running just from the console without any guard-cucumber specific settings, so that you get your optimal :cli
settings. This would cover lines https://github.com/netzpirat/guard-cucumber/blob/master/lib/guard/cucumber/runner.rb#L40-44 and is completely independent from the Guard.
If you don't want to have Growl notifications, your done now (just disable this part by setting :notifications
to false). If you want to have these too, you'll have to bring the guard-cucumber formatter into play: https://github.com/netzpirat/guard-cucumber/blob/master/lib/guard/cucumber/runner.rb#L48-51. These settings are for a custom formatter that is responsible for showing the notification. Perhaps something in a newer Cucumber version has changed and some of the options aren't necessary anymore (like --out
or --require
). Again, this can be done from the command line without having Guard running.
Hope this helps.
This is getting more interesting, when i disabled notifications (:notification => false), it showed me the errors but pickle steps turned into Undefined, if you enable back notifications, that step passes.
I'll look into the source code when i get a chance.
You can test this behavior clonning my public repo: https://github.com/jbz/agi/tree/develop
I have cloned your repository, ran bundler, executed the db:migrate
task and changed the :cli
option from guard-cucumber to
:cli => '--drb --no-profile --color --format progress --strict'
In addition I have removed the growl
and the growl_notify
gem from the Gemfile (you just need one Growl library) and added Guard master branch and the ruby_gntp
gem:
gem 'guard', :git => 'git://github.com/guard/guard.git'
gem 'ruby_gntp'
This was necessary for me because I have Growl 1.3 on my Mac, so the growl
gem is not compatible with it. Also the other growl library growl_notify
doesn't run on my machine, it always segfaults. So I have to use ruby_gntp
that has not been released officially, thus the need for installing Guard from master branch.
I started Guard and began to modify the features to see how it behaves. I cannot see any unexpected behavior, it runs fine over Spork and shows me the spec runner output (failing, success and pending) and the Growl notification.
The problem was with 'growl_notify' gem, as soon as i tooked it out of the Gemfile i could see the cucumber error detail. I couldn't use ruby_gntp in my Snow Leopard machine but growl gem works fine. My test group looks like this:
group :test do
gem 'database_cleaner'
gem 'rails3-generators' #mainly for factory_girl & simple_form at this point
gem 'rspec-rails'
gem 'factory_girl_rails' # mocking
gem 'cucumber-rails'
gem "pickle" # gives you a lot of already defined cucumber steps
gem 'capybara'
gem 'guard'
#gem 'growl_notify' # if used, guard doesn't show the errors
gem 'growl' # guard uses to notify
gem 'guard-cucumber'
gem 'rb-fsevent' # required by guard for notifications
gem "guard-rspec" # run rspec when a spec is saved
gem "launchy" # show the web page in case of error
gem "spork", "> 0.9.0.rc" # Improve loading times during testing
gem "guard-spork"
end
Thanks a lot! Cool! Thanks for letting me now that is was a problem with growl_notify
.
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"
If i removed the :cli option in my Guardfile, it shows things correctly: Thanks!