vendredi 8 mai 2015

Using Zeus to run my rails test will get a lot more redundant error messages

I'm using Zeus to speed up my unit test and it really save me a lot of time, but sometimes it will show a lot more error messages that make me hard to trace the report.

For example, I start a new simple static page project and add a test:

test "should get testpage" do 
  get :test_page
  assert_response :success
end

without add the corresponding routes

when I run "rake test", I will only get:

ERROR["test_should_get_testpage", StaticPagesControllerTest, 0.387293]
test_should_get_testpage#StaticPagesControllerTest (0.39s)
ActionController::UrlGenerationError:                  
ActionController::UrlGenerationError: No route matches     {:action=>"test_page", :controller=>"static_pages"}
test/controllers/static_pages_controller_test.rb:33:in `block in <class:StaticPagesControllerTest>'
test/controllers/static_pages_controller_test.rb:33:in `block in <class:StaticPagesControllerTest>'

but if I run 'zeus rake test', I will get:

test_should_get_testpage#StaticPagesControllerTest (0.55s)
ActionController::UrlGenerationError:            
ActionController::UrlGenerationError: No route matches   
{:action=>"test_page", :controller=>"static_pages"}        
/Users/arthur/.rvm/gems/ruby-1.9.3-p551/gems/actionpack- 4.2.1/lib/action_dispatch/journey/formatter.rb:46:in `generate'        
/Users/arthur/.rvm/gems/ruby-1.9.3-p551/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:727:in `generate'        
/Users/arthur/.rvm/gems/ruby-1.9.3-p551/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:758:in `generate'        
/Users/arthur/.rvm/gems/ruby-1.9.3-p551/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:753:in `generate_extras'         
/Users/arthur/.rvm/gems/ruby-1.9.3-p551/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:748:in `extra_keys'

...(and ten more lines like above)

is these error messages important? or how can I suppress them safely?

Thanks!

Aucun commentaire:

Enregistrer un commentaire