ruby on rails - Errors when running rspec with guard and growl -
i'm high school student new ruby on rails , trying develop rails 4 application tdd. using guard along rspec, spork, , growl notifications, when run guard run tests, following output , no results tests:
11 clairehuang:mezzo$ guard 18:23:31 - info - guard using growlnotify send notifications. 18:23:31 - info - guard using terminaltitle send notifications. 18:23:31 - info - starting spork rspec using rspec, unknown loading spork.prefork block... spork ready , listening on 8989! 18:23:33 - info - spork server rspec started 18:23:33 - info - livereload waiting browser connect. 18:23:33 - info - guard::rspec running 18:23:33 - info - running specs /users/clairehuang/.rvm/gems/ruby-1.9.3-p448/gems/growl_notify-0.0.3/lib/growl_notify.rb:53: warning: instance variable @icon not initialized 18:23:34 - info - guard watching @ '/users/clairehuang/sites/mezzo' /users/clairehuang/.rvm/gems/ruby-1.9.3-p448/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:76: warning: global variable `$celluloid_debug' not initialized /users/clairehuang/.rvm/gems/ruby-1.9.3-p448/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:76: warning: global variable `$celluloid_debug' not initialized /users/clairehuang/.rvm/gems/ruby-1.9.3-p448/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:76: warning: global variable `$celluloid_debug' not initialized /users/clairehuang/.rvm/gems/ruby-1.9.3-p448/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:76: warning: global variable `$celluloid_debug' not initialized /users/clairehuang/.rvm/gems/ruby-1.9.3-p448/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:76: warning: global variable `$celluloid_debug' not initialized /users/clairehuang/.rvm/gems/ruby-1.9.3-p448/gems/guard-2.6.1/lib/guard/interactor.rb:64: warning: instance variable @enabled not initialized /users/clairehuang/.rvm/gems/ruby-1.9.3-p448/gems/guard-2.6.1/lib/guard/interactor.rb:64: warning: instance variable @enabled not initialized /users/clairehuang/.rvm/gems/ruby-1.9.3-p448/gems/guard-2.6.1/lib/guard/interactor.rb:64: warning: instance variable @enabled not initialized /users/clairehuang/.rvm/gems/ruby-1.9.3-p448/gems/guard-2.6.1/lib/guard/interactor.rb:64: warning: instance variable @enabled not initialized /users/clairehuang/.rvm/gems/ruby-1.9.3-p448/gems/guard-2.6.1/lib/guard/interactor.rb:129: warning: instance variable @thread not initialized /users/clairehuang/.rvm/gems/ruby-1.9.3-p448/gems/pry-0.10.0/lib/pry/method.rb:383: warning: instance variable @method not initialized [1] guard(main)>
if run rspec independently of guard, tests run okay , display output:
13 clairehuang:mezzo$ rspec /users/clairehuang/.rvm/gems/ruby-1.9.3-p448/gems/spork-1.0.0rc4/lib/spork.rb:83: warning: assigned unused variable - method_name_with_spork run options: include {:focus=>true} examples filtered out; ignoring {:focus=>true} f failures: 1) donations /donations should display donations failure/error: visit donations_path nameerror: undefined local variable or method `donations_path' #<rspec::examplegroups::donations::getdonations:0x007ffd038e5118> # ./spec/requests/donations_spec.rb:6:in `block (3 levels) in <top (required)>' deprecation warnings: rspec::core::configuration#treat_symbols_as_metadata_keys_with_true_values= deprecated, set true default , setting false has no effect. if need more of backtrace of these deprecations identify make necessary changes, can configure `config.raise_errors_for_deprecations!`, , turn deprecation warnings errors, giving full backtrace. 1 deprecation warning total finished in 0.00081 seconds (files took 0.20421 seconds load) 1 example, 1 failure failed examples: rspec ./spec/requests/donations_spec.rb:5 # donations /donations should display donations
how can tests run guard? thank in advance!
guardfile:
guard 'spork', :cucumber_env => { 'rails_env' => 'test' }, :rspec_env => { 'rails_env' => 'test' } watch('config/application.rb') watch('config/environment.rb') watch('config/environments/test.rb') watch(%r{^config/initializers/.+\.rb$}) watch('gemfile') watch('gemfile.lock') watch('spec/spec_helper.rb') { :rspec } watch('test/test_helper.rb') { :test_unit } watch(%r{features/support/}) { :cucumber } end guard 'livereload' watch(%r{app/views/.+\.(erb|haml|slim)$}) watch(%r{app/helpers/.+\.rb}) watch(%r{public/.+\.(css|js|html)}) watch(%r{config/locales/.+\.yml}) # rails assets pipeline watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html|png|jpg))).*}) { |m| "/assets/#{m[3]}" } end guard :rspec, :all_on_start => true, :cmd => "--drb" 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|\.slim)$}) { |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 features specs watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" } # turnip features , steps watch(%r{^spec/acceptance/(.+)\.feature$}) watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| dir[file.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' } end
Comments
Post a Comment