netzpirat / guard-cucumber Goto Github PK
View Code? Open in Web Editor NEWGuard::Cucumber automatically runs your features (much like autotest)
Home Page: https://rubygems.org/gems/guard-cucumber
License: MIT License
Guard::Cucumber automatically runs your features (much like autotest)
Home Page: https://rubygems.org/gems/guard-cucumber
License: MIT License
When I press Ctrl-C
then guard-cucumber is turned off as specified in https://github.com/guard/guard#readme
Is there any way to stop running feature(s) in guard-cucumber ?
The problem is that guard-cucumber autofires cucumber tests with autosave, but I don't want it in cukes having 10's of feautes.
Another solution might be to make guard-cucumber run only the specific feature which has been modified and not the whole cuke.
It appears to be trying to register with growl for notifications, but it's failing
OSERROR: -10000
MESSAGE: Apple event handler failed.
COMMAND: app("/Users/DVG/Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app").register({:all_notifications=>["success", "pending", "failed", "notify"], :as_application=>"Guard", :default_notifications=>"notify"})
from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/gems/rb-appscript-0.6.1/lib/appscript.rb:642:in method_missing' from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/gems/growl_notify-0.0.3/lib/growl_notify.rb:29:in
register'
from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/gems/growl_notify-0.0.3/lib/growl_notify.rb:19:in config' from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/gems/guard-0.9.1/lib/guard/notifiers/growl_notify.rb:42:in
available?'
from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/gems/guard-0.9.1/lib/guard/notifier.rb:109:in add_notification' from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/gems/guard-0.9.1/lib/guard/notifier.rb:146:in
block in auto_detect_notification'
from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/gems/guard-0.9.1/lib/guard/notifier.rb:146:in each' from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/gems/guard-0.9.1/lib/guard/notifier.rb:146:in
any?'
from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/gems/guard-0.9.1/lib/guard/notifier.rb:146:in auto_detect_notification' from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/gems/guard-0.9.1/lib/guard/notifier.rb:72:in
turn_on'
from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/gems/guard-0.9.1/lib/guard.rb:167:in start' from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/gems/guard-0.9.1/lib/guard/cli.rb:74:in
start'
from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/task.rb:22:in run' from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:118:in
invoke_task'
from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor.rb:263:in dispatch' from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/base.rb:389:in
start'
from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/gems/guard-0.9.1/bin/guard:6:in <top (required)>' from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/bin/guard:19:in
load'
from /Users/DVG/.rvm/gems/ruby-1.9.3-p0/bin/guard:19:in `
I switched over to the system default 1.8.7, and it at least got farther, but then my config files didn't work because of 1.9.3 style syntax
Could guard-cucumber (0.3.4) depend on guard 0.4.0 instead of '~> 0.3.1' so I can use guard-rspec(0.4.0 which depends on guard 0.4.0) and guard-cucumber together?
When :notification => true
the run summary line is not printed to $stdout
. Example:
1 failed step, 2 skipped steps, 15 undefined steps
I have a simple fix for this issue. Pull request forthcoming.
Getting this error with the default cucumber guard:
/Users/alex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/minitest-4.7.5/lib/minitest/unit.rb:1036:in `block in process_args': invalid option: --no-profile (OptionParser::InvalidOption)
from /Users/alex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/minitest-4.7.5/lib/minitest/unit.rb:1015:in `new'
from /Users/alex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/minitest-4.7.5/lib/minitest/unit.rb:1015:in `process_args'
from /Users/alex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/minitest-4.7.5/lib/minitest/unit.rb:1065:in `_run'
from /Users/alex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/minitest-4.7.5/lib/minitest/unit.rb:1058:in `run'
from /Users/alex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/minitest-4.7.5/lib/minitest/unit.rb:794:in `block in autorun'
I'm on Ubuntu 10.04, and following the guard-cucumber
readme I use the libnotify
and rb-inotify
gems.
I launch the guard:
bundle exec guard start --group template 2>&1|tee tmp/log/guard/template.log
When I set :notification => true
I do see GUI notifications of missing steps but these do not appear in the template.log
file.
When I set :notification => false
I do get the full output in the template.log
but no GUI notifications.
Is this intended behavior?
If not then there is a way to work around this issue until a fix is found:
guard-cucumber
option :notification => true
--format pretty
It looks like the :binstubs => true
option is ignored.
Here is the verbose output of guard:
> bin/guard -g features --verbose
Guard uses GNTP to send notifications.
Guard is now watching at '/Users/dnagir/proj/abc'
DEBUG (17:33:51): Hook :start_begin executed for Guard::Cucumber
Running all features
DEBUG (17:33:51): Command execution: bundle exec cucumber --color --format pretty --no-profile --tags @focus --require /Users/dnagir/.rvm/gems/jruby-1.6.5.1/gems/guard-cucumber-0.7.4/lib/guard/cucumber/notification_formatter.rb --format Guard::Cucumber::NotificationFormatter --out /dev/null --require features features
Disabling profiles...
And the config is:
guard 'cucumber', :binstubs => true, :cli => '--color --format pretty --no-profile '--tags @focus do
watch(%r{^features/.+\.feature$})
watch(%r{^features/support/.+$}) { 'features' }
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
end
Using the guard from master branch and guard-cucumber (0.7.4).
Am I doing something wrong?
I have put my features in a subfolder hierarchy, and the path is defined in the Guardfile, thanks to the feature_sets option:
guard 'cucumber', :cli => '--profile default', :feature_sets => ['tests/features'] do
watch(%r{(^tests/features/.+\.feature$)}) { |m| m }
end
When I launch guard, all tests are passed, but when I modify a file under watch (a .feature file in tests/features), guard doesn't see the modification.
This seems to be caused by line 86 in lib/guard/cucumber.rb:
paths = Inspector.clean(paths)
It seems that Inspector.clean doesn't take in account the :feature_sets option passed.
I have growl_notify and when guard is running cucumber features it blows up when trying to do a growl notification. The growl for rspec seems to work.
I've started a new rails app (3.2.3) from scratch with ruby-1.9.3-p194. I get a crash when running guard-cucumber. Plain cucumber using rake cucumber
works fine.
I have the following simple feature file
Feature: User Signup
In order to use the site
As a user
I want to sign up to the site
Scenario: User signs up to the site
Given I want to sign up
When I arrive to the home page
Then I should see a "signup" link
My Guardfile
looks like so (generated using bundle exec guard init rspec
and bundle exec guard init cucumber
:
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
guard 'rspec', :version => 2 do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
# Rails example
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
watch('config/routes.rb') { "spec/routing" }
watch('app/controllers/application_controller.rb') { "spec/controllers" }
# Capybara request specs
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
end
guard 'cucumber' do
watch(%r{^features/.+\.feature$})
watch(%r{^features/support/.+$}) { 'features' }
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
end
My Gemfile
looks like this:
source 'https://rubygems.org'
gem 'rails', '3.2.3'
gem 'sqlite3'
gem 'devise'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use debugger
gem 'debugger', :group => [ :development, :test ]
# gem 'ruby-debug19', :require => 'ruby-debug'
group :test do
gem 'rspec-rails'
gem 'capybara'
gem 'database_cleaner'
gem 'factory_girl_rails'
gem 'guard-rspec'
gem 'guard-cucumber'
gem 'cucumber-rails'
gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
end
When I start guard with bundle exec guard
, I get the following stack trace:
Running all features
Disabling profiles...
wrong number of arguments (6 for 5) (ArgumentError)
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/guard-cucumber-0.7.5/lib/guard/cucumber/notification_formatter.rb:69:in `step_name'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:173:in `block in send_to_all'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:171:in `each'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:171:in `send_to_all'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:166:in `broadcast'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:112:in `visit_step_name'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:105:in `block in visit_step_result'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:163:in `broadcast'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:104:in `visit_step_result'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/step_invocation.rb:43:in `visit_step_result'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/step_invocation.rb:39:in `accept'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:99:in `block in visit_step'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:163:in `broadcast'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:98:in `visit_step'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/step_collection.rb:15:in `block in accept'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/step_collection.rb:14:in `each'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/step_collection.rb:14:in `accept'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:93:in `block in visit_steps'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:163:in `broadcast'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:92:in `visit_steps'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/scenario.rb:55:in `block (2 levels) in accept'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/runtime.rb:80:in `block (2 levels) in with_hooks'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/runtime.rb:96:in `before_and_after'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/runtime.rb:79:in `block in with_hooks'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/runtime/support_code.rb:120:in `call'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/runtime/support_code.rb:120:in `block (3 levels) in around'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/language_support/language_methods.rb:9:in `block in around'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/language_support/language_methods.rb:91:in `call'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/language_support/language_methods.rb:91:in `execute_around'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/language_support/language_methods.rb:8:in `around'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/runtime/support_code.rb:119:in `block (2 levels) in around'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/runtime/support_code.rb:117:in `call'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/runtime/support_code.rb:117:in `around'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/runtime.rb:91:in `around'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/runtime.rb:78:in `with_hooks'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/scenario.rb:53:in `block in accept'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/scenario.rb:108:in `with_visitor'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/scenario.rb:47:in `accept'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:51:in `block in visit_feature_element'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:163:in `broadcast'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:50:in `visit_feature_element'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/feature.rb:43:in `block in accept'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/feature.rb:42:in `each'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/feature.rb:42:in `accept'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:20:in `block in visit_feature'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:163:in `broadcast'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:19:in `visit_feature'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/features.rb:29:in `block in accept'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/features.rb:17:in `each'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/features.rb:17:in `each'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/features.rb:28:in `accept'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:14:in `block in visit_features'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:163:in `broadcast'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/ast/tree_walker.rb:13:in `visit_features'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/runtime.rb:46:in `run!'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/cli/main.rb:43:in `execute!'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/lib/cucumber/cli/main.rb:20:in `execute'
/Users/shilo/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/cucumber-1.2.0/bin/cucumber:14:in `<top (required)>'
/Users/shilo/.rbenv/versions/1.9.3-p194/bin/cucumber:23:in `load'
/Users/shilo/.rbenv/versions/1.9.3-p194/bin/cucumber:23:in `<main>'
I've seen a previous issue (#28) mentioning 1.9.3 problem, but it was closed due to inactivity. Any ideas what's going on?
Hi. I'm sharing folders between windows and linux and when using guard-cucumber I get this error:
ERROR: Guard::Cucumber failed to achieve its , exception was:
Errno::ETXTBSY: Text file busy - rerun.txt
.../guard-cucumber-0.7.2/lib/guard/cucumber.rb:114:in delete
.../guard-cucumber-0.7.2/lib/guard/cucumber.rb:114:in read_failed_features
.../guard-cucumber-0.7.2/lib/guard/cucumber.rb:60:in run_all
...
Guard::Cucumber has just been fired
(running a rm rerun.txt
is working fine)
It can be avoided using :keep_failed => false, but I'd be cool if we can fix it.
By default, guard-cucumber disables the @wip
tag (--tags ~@wip
). I'm trying to have the ability to apply a focus tag or wip tag to be able to focus on a particular scenario when the scenario is tagged with the appropriate tag. In the README, it gives the impression that the focus_on: 'dev'
option is intended for this case. However, adding this option to my Guardfile, and adding the @dev
tag to my scenario has no effect. I am using spork which may be partly to blame. I have the default config/cucumber.yml file, but guard runs with the --no-profile option so it shouldn't matter. Here's my Guardfile:
guard 'spork', cucumber: true, test_unit: false, rspec: true, bundler: false, wait: 50, rspec_env: { 'RAILS_ENV' => 'test' } do
watch('config/application.rb')
watch('config/environment.rb')
watch(%r{^config/environments/.+\.rb$})
watch(%r{^config/initializers/.+\.rb$})
watch('spec/spec_helper.rb')
end
guard 'cucumber', all_on_start: false, cli: '--drb', focus_on: 'dev' do
watch(%r{^features/.+\.feature$})
watch(%r{^features/support/.+$}) { 'features' }
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
end
Here's the cucumber run options:
11:56:33 - INFO - Running Cucumber features: bundle exec cucumber --drb --require /Users/andrew/.rbenv/versions/1.9.3-p385/lib/ruby/gems/1.9.1/gems/guard-cucumber-1.2.2/lib/guard/cucumber/notification_formatter.rb --format Guard::Cucumber::NotificationFormatter --out /dev/null --require features features/promotions/exclusion_from_free_shipping.feature
Using the default profile...
Running tests with args ["--require", "/Users/andrew/.rbenv/versions/1.9.3-p385/lib/ruby/gems/1.9.1/gems/guard-cucumber-1.2.2/lib/guard/cucumber/notification_formatter.rb", "--format", "Guard::Cucumber::NotificationFormatter", "--out", "/dev/null", "--require", "features", "features/promotions/exclusion_from_free_shipping.feature", "--format", "pretty", "--strict", "--tags", "~@wip", "--no-profile"]...
Disabling profiles...
Let me know if you need anything else.
How should I run a particular feature when using Spork + Guard ? Should I use TAG and running guard with a particular profile ?
My cucumber.yml is https://gist.github.com/1337755
When running guard-cucumber I get the following output at the end of tests;
/Users/john/.rvm/gems/ruby-2.0.0-p195@mindr/gems/minitest-4.7.5/lib/minitest/unit.rb:1037:in `block in process_args': invalid option: --no-profile (OptionParser::InvalidOption)
from /Users/john/.rvm/gems/ruby-2.0.0-p195@mindr/gems/minitest-4.7.5/lib/minitest/unit.rb:1016:in `new'
from /Users/john/.rvm/gems/ruby-2.0.0-p195@mindr/gems/minitest-4.7.5/lib/minitest/unit.rb:1016:in `process_args'
from /Users/john/.rvm/gems/ruby-2.0.0-p195@mindr/gems/minitest-4.7.5/lib/minitest/unit.rb:1066:in `_run'
from /Users/john/.rvm/gems/ruby-2.0.0-p195@mindr/gems/minitest-4.7.5/lib/minitest/unit.rb:1059:in `run'
from /Users/john/.rvm/gems/ruby-2.0.0-p195@mindr/gems/minitest-4.7.5/lib/minitest/unit.rb:795:in `block in autorun'
i don't get this if I run cucumber
directly from the command line.
I'm not sure where to start looking.
Any plans to support Zeus?
test::unit and rspec have execution times, guard-cucumber does not. this should not be.
I want X failed, X pending, X passed in X seconds
Run Cucumber features features/password_client.feature
-break test
Run Cucumber features features/password_client.feature
-fix test
Run Cucumber features features/password_client.feature features/
password_client.feature:22
All tests get run, and the feature on 22 gets run twice. Should only
be once, right?
A similar undertaking went on for the rspec-guard gem. Hopefully this one is similar?
I haven't looked into this at all, I'm just wishing for the feature ๐
Thanks
Trying to get a set of features running with Guard and Guard Cucumber. I've got a Guardfile with the following contents:
guard 'cucumber' do
watch(%r{^features/.+\.feature$})
watch(%r{^features/support/.+$}) { 'features' }
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
end
When starting Guard I get:
Running all features
Disabling profiles...
Guard is not a module (TypeError)
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/guard-0.7.0/lib/guard/ui.rb:1:in `<top (required)>'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `block in require'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:227:in `load_dependency'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/guard-0.7.0/lib/guard/notifier.rb:3:in `<top (required)>'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `block in require'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:227:in `load_dependency'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/guard-cucumber-0.6.3/lib/guard/cucumber/notification_formatter.rb:2:in `<top (required)>'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:235:in `load'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:235:in `block in load'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:227:in `load_dependency'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:235:in `load'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.0.6/lib/cucumber/rb_support/rb_language.rb:143:in `load_code_file'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.0.6/lib/cucumber/runtime/support_code.rb:171:in `load_file'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.0.6/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.0.6/lib/cucumber/runtime/support_code.rb:82:in `each'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.0.6/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.0.6/lib/cucumber/runtime.rb:137:in `load_step_definitions'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.0.6/lib/cucumber/runtime.rb:39:in `run!'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.0.6/lib/cucumber/cli/main.rb:43:in `execute!'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.0.6/lib/cucumber/cli/main.rb:20:in `execute'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/gems/cucumber-1.0.6/bin/cucumber:14:in `<top (required)>'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/bin/cucumber:19:in `load'
/Users/jacob/.rvm/gems/ruby-1.9.2-p290/bin/cucumber:19:in `<main>'
I've got a stock cucumber install (aside from spork setup?) and am trying to get guard-spork/guard-cucumber to run with it.
I encountered an issue with a conflict from guard and my stock cucumber.yml file, In the end I just changed my default cucumber profile so that it did not automatically call a formatter. Is there a better way to handle this?
Also a note in the readme wouldn't go amiss either :)
cucumber.yml now looks like:
std_opts = "--strict --tags ~@wip"
%>
default: --drb <%= std_opts %> features
I am using guard-cucumber 1.2.0, and have the following section in my Guardfile. Despite setting after_all_pass to false and using --no-profile, all tests run after a file passes.
guard 'cucumber', all_on_start: false, after_all_pass: false, cli: "--no-profile --color --format Cucumber::Formatter::Fuubar --strict" do
watch(%r{^features/.+\.feature$})
watch(%r{^features/support/.+$}) { 'features' }
watch(%r{^app/views/layouts/application\.html(\.erb|\.haml)$}) { 'features' }
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
end
This means that after saving a .feature file containing 3 tests, if it passes the entire suite containing over 300 tests (some of which use Selenium) will run.
If I'm doing something wrong, please could someone tell me what it is, because I seem to have done everything the docs suggest, and my only option at the moment seems to be to disable Guard and run features manually.
Thanks
Hi, I wanted to discuss this before attempting to fix/contribute.
The keep_failed option doesn't always preserve failures between invocations and any failures inside the file are deleted.
This happens when a "cucumber features" is triggered on file change, and not "cucumber features file:line" (based on cucumber watcher rules in the Guardfile).
Basically, whenever running all the tests is requested, rerun.txt files and previous failures are ignored.
This doesn't make sense from a workflow perspective, since this can rerun hundreds of tests even when rerun.txt still contains a failure.
Solution: rerun.txt should be treated as a persistent storage (database) for failures, taking priority even when all tests are asked to be run.
This is ok, since all tests are run anyway after recent failures pass. Failures should only be cleared when they actually pass, not when all tests are asked to be run.
Implementation (write_rerun_feature): first read the contents of the existing rerun.txt file, merge those with existing failures, then overwrite the file.
Let me know if this makes sense to you.
Hey,
I defined two cucumber profiles: default(for browser simulated tests) and selenium(for selenium tests), they looks like the following:
default: --tags ~@wip --tags ~@Selenium -r features/support/env.rb -r features/support/paths.rb -r features/support/hooks.rb -r features/support/world.rb -r features/step_definitions --color --format progress features
selenium: --tags @Selenium -r features/support/env.rb -r features/support/paths.rb -r features/support/hooks.rb -r features/support/world.rb -r features/support/selenium.rb -r features/step_definitions
But whenever I tried to run guard with default profile, it started selenium CI server, opened a browser, then ran selenium tests.
I found the following lines in runner.rb:
if options[:notification] != false
notification_formatter_path = File.expand_path(File.join(File.dirname(FILE), 'notification_formatter.rb'))
cmd << "--require #{ notification_formatter_path }"
cmd << "--format Guard::Cucumber::NotificationFormatter"
cmd << "--out #{ null_device }"
cmd << "--require features"
end
When we comment 'cmd << "--require features"', the tests can really run in default profile, otherwise it will always run selenium tests. Question is what that line of code for?
undefined method `file_colon_line' for #<Cucumber::Reports::Legacy::Ast::Scenario:0x007fe348d940d0> (NoMethodError)
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/guard-cucumber-1.4.1/lib/guard/cucumber/notification_formatter.rb:56:in `after_feature_element'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/reports/legacy_formatter.rb:19:in `block in method_missing'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/reports/legacy_formatter.rb:18:in `each'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/reports/legacy_formatter.rb:18:in `method_missing'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/reports/legacy_formatter.rb:515:in `after'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/reports/legacy_formatter.rb:505:in `after_test_case'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/reports/legacy_formatter.rb:232:in `after_test_case'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/reports/legacy_formatter.rb:97:in `after_test_case'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/reports/legacy_formatter.rb:47:in `after_test_case'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/test/runner.rb:113:in `test_case'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/test/case.rb:20:in `describe_to'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/test/mapper.rb:18:in `test_case'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/test/case.rb:20:in `describe_to'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/runtime.rb:286:in `test_case'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/test/case.rb:20:in `describe_to'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/test/filters.rb:14:in `test_case'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/test/case.rb:20:in `describe_to'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/test/filters.rb:30:in `test_case'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/test/case.rb:20:in `describe_to'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/test/filters/tag_filter.rb:10:in `test_case'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/test/case.rb:20:in `describe_to'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/compiler.rb:35:in `on_test_case'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/compiler.rb:71:in `scenario'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/ast/describes_itself.rb:6:in `describe_to'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/ast/describes_itself.rb:8:in `block (2 levels) in describe_to'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/ast/describes_itself.rb:7:in `each'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/ast/describes_itself.rb:7:in `block in describe_to'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/compiler.rb:56:in `call'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/compiler.rb:56:in `feature'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/ast/describes_itself.rb:6:in `describe_to'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/compiler.rb:12:in `feature'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core/gherkin/parser.rb:19:in `document'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core.rb:12:in `block in parse'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core.rb:11:in `each'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core.rb:11:in `parse'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core.rb:23:in `compile'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-core-1.0.0.beta.3/lib/cucumber/core.rb:31:in `execute'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/runtime.rb:71:in `run!'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/lib/cucumber/cli/main.rb:38:in `execute!'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cucumber-2.0.0.beta.3/bin/cucumber:9:in `<top (required)>'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta2/lib/active_support/dependencies.rb:242:in `load'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta2/lib/active_support/dependencies.rb:242:in `block in load'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta2/lib/active_support/dependencies.rb:233:in `load_dependency'
/Users/maksar/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta2/lib/active_support/dependencies.rb:242:in `load'
/Users/maksar/Projects/git/opener/bin/cucumber:7:in `<top (required)>'
How do people feel about an option similar to :run_all => { :cli => "-p" } which appears now in guard-rspec?
This allows you to set different options when running all features than you would use when running individual ones.
When using spork all features are always run, not only the one changed. If I remove spork from my Guardfile, everything works fine.
I'm not sure if this a configuration issue on my side or bug of guard-cucumber. Using rspec+guard+spork works as expected.
The update to options[:cli]
has removed the --require
fixes to support guard-spork out of the box (from issue 3). I was in the process of submitting a pull request to add this back but realized that it would involve some parsing of options[:cli]
. That feels borderline awkward and would need additional spec'ing to ensure the requires weren't added by the user explicitly.
So, I'd suggest that the README could use a note explaining how to get guard-cucumber and guard-spork working together. Here's the bare minimum that will work:
guard 'cucumber', :cli => '--drb --require features/support --require features/step_definitions' do
# ...
end
Thanks for this plugin!
I am learning BDD using cucumber. So any pointers regarding my dotfiles, approach are appreciated. My issues seems almost identical to this one. However I am unable to use this solution to solve my problem.
This is the output from my terminal:
Guard uses Libnotify to send notifications.
Guard is now watching at '/home/rhodee/GitRepos/projects/adelante'
Starting Spork for RSpec, Cucumber
Using Cucumber
Using RSpec
Preloading Rails environment
.../support/env.rb has not been bootstrapped. Run spork --bootstrap to do so.
Loading Spork.prefork block...
Preloading Rails environment
Spork is ready and listening on 8990!
Spork is ready and listening on 8989!
Spork server for RSpec, Cucumber successfully started
Running all features
Disabling profiles...
UUU
1 scenario (1 undefined)
3 steps (3 undefined)
0m1.332s
I believe where the UUU
string appears I should see my errors. I am able to see the errors when running bundle exec rake cucumber
outside of Guard.
Gemfile:
group :development do
gem 'ffaker'
gem 'annotate', git: 'https://github.com/ctran/annotate_models.git'
gem 'libnotify'
gem 'guard-livereload'
gem 'guard-spork'
gem 'guard-cucumber'
gem 'spork', "~> 0.9.0.rc"
end
group :test do
gem 'rspec-rails', "> 2.7.0"> 0.7.0"
gem 'database_cleaner', "
gem 'cucumber-rails', "> 1.2.1"> 1.4.0"
gem 'factory_girl_rails', "
gem 'spork', "~> 0.9.0.rc"
end
The Guardfile contains:
guard 'spork' do
watch('config/application.rb')
watch('config/environment.rb')
watch(%r{^config/environments/..rb$})
watch(%r{^config/initializers/..rb$})
watch(%r{^spec/support/.+.rb$})
watch('Gemfile')
watch('Gemfile.lock')
watch('spec/spec_helper.rb') { :rspec }
watch(%r{features/support/}) { :cucumber }
watch('spec/spec_helper.rb')
end
guard 'cucumber' do
watch(%r{^features/.+.feature$})
watch(%r{^features/support/.+$}) { 'features' }
watch(%r{^features/step_definitions/(.+)_steps.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
end
guard 'livereload' do
watch(%r{app/.+.(erb|haml)})
watch(%r{app/helpers/.+.rb})
watch(%r{(public/|app/assets).+.(css|js|html)})
watch(%r{(app/assets/.+.css).s[ac]ss}) { |m| m[1] }
watch(%r{(app/assets/.+.js).coffee}) { |m| m[1] }
watch(%r{config/locales/.+.yml})
end
The error is on the playground branch of my repo adelante.
Cheers.
Run using guard-spork and running individual features the step definitions aren't loaded, fix was to add a require to the cli options"
guard 'cucumber', :cli => "--drb --require features/step_definitions" do
watch(%r{^features/.+\.feature$})
watch(%r{^features/support/.+$}) { 'features' }
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
end
not sure if this needs a bugfix or just a note in the readme
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.