0

I'm new to Rails and RSpec and following some tutorials it seems like the output I'm getting from a failing test is far more verbose than it should be. Whenver I run an rspec test here is the output:

.F

Failures:

  1) Users can create new projects when providing invalid attributes
     Failure/Error: click_button "Create Project"
     ActionView::MissingTemplate:
       Missing template projects/create, application/create with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in:
         * "/Users/michael/code/project/ticketee/app/views"
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionview-4.2.4/lib/action_view/path_set.rb:46:in `find'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionview-4.2.4/lib/action_view/lookup_context.rb:121:in `find'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionview-4.2.4/lib/action_view/renderer/abstract_renderer.rb:18:in `find_template'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionview-4.2.4/lib/action_view/renderer/template_renderer.rb:40:in `determine_template'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionview-4.2.4/lib/action_view/renderer/template_renderer.rb:8:in `render'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionview-4.2.4/lib/action_view/renderer/renderer.rb:42:in `render_template'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionview-4.2.4/lib/action_view/renderer/renderer.rb:23:in `render'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionview-4.2.4/lib/action_view/rendering.rb:100:in `_render_template'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_controller/metal/streaming.rb:217:in `_render_template'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionview-4.2.4/lib/action_view/rendering.rb:83:in `render_to_body'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_controller/metal/rendering.rb:32:in `render_to_body'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_controller/metal/renderers.rb:37:in `render_to_body'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/abstract_controller/rendering.rb:25:in `render'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_controller/metal/rendering.rb:16:in `render'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/core_ext/benchmark.rb:12:in `ms'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_controller/metal/instrumentation.rb:44:in `block in render'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activerecord-4.2.4/lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_controller/metal/instrumentation.rb:43:in `render'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_controller/metal/implicit_render.rb:5:in `send_action'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/abstract_controller/base.rb:198:in `process_action'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_controller/metal/rendering.rb:10:in `process_action'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:117:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:117:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:505:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:505:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:81:in `run_callbacks'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/abstract_controller/callbacks.rb:19:in `process_action'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_controller/metal/rescue.rb:29:in `process_action'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/notifications.rb:164:in `block in instrument'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/notifications.rb:164:in `instrument'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activerecord-4.2.4/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/abstract_controller/base.rb:137:in `process'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionview-4.2.4/lib/action_view/rendering.rb:30:in `process'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_controller/metal.rb:196:in `dispatch'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_controller/metal.rb:237:in `block in action'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_dispatch/routing/route_set.rb:76:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_dispatch/routing/route_set.rb:76:in `dispatch'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_dispatch/routing/route_set.rb:45:in `serve'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_dispatch/journey/router.rb:43:in `block in serve'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_dispatch/journey/router.rb:30:in `each'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_dispatch/journey/router.rb:30:in `serve'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_dispatch/routing/route_set.rb:821:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/rack-1.6.4/lib/rack/etag.rb:24:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/rack-1.6.4/lib/rack/conditionalget.rb:38:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_dispatch/middleware/flash.rb:260:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_dispatch/middleware/cookies.rb:560:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activerecord-4.2.4/lib/active_record/query_cache.rb:36:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:81:in `run_callbacks'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/railties-4.2.4/lib/rails/rack/logger.rb:38:in `call_app'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/railties-4.2.4/lib/rails/rack/logger.rb:20:in `block in call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/tagged_logging.rb:68:in `block in tagged'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/tagged_logging.rb:26:in `tagged'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/tagged_logging.rb:68:in `tagged'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/railties-4.2.4/lib/rails/rack/logger.rb:20:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_dispatch/middleware/request_id.rb:21:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/activesupport-4.2.4/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/rack-1.6.4/lib/rack/lock.rb:17:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/actionpack-4.2.4/lib/action_dispatch/middleware/static.rb:116:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/railties-4.2.4/lib/rails/engine.rb:518:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/railties-4.2.4/lib/rails/application.rb:165:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/rack-1.6.4/lib/rack/urlmap.rb:66:in `block in call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `each'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `call'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/rack-test-0.6.3/lib/rack/mock_session.rb:30:in `request'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/rack-test-0.6.3/lib/rack/test.rb:244:in `process_request'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/rack-test-0.6.3/lib/rack/test.rb:67:in `post'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/capybara-2.5.0/lib/capybara/rack_test/browser.rb:60:in `process'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/capybara-2.5.0/lib/capybara/rack_test/browser.rb:35:in `process_and_follow_redirects'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/capybara-2.5.0/lib/capybara/rack_test/browser.rb:26:in `submit'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/capybara-2.5.0/lib/capybara/rack_test/form.rb:76:in `submit'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/capybara-2.5.0/lib/capybara/rack_test/node.rb:61:in `click'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/capybara-2.5.0/lib/capybara/node/element.rb:134:in `block in click'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/capybara-2.5.0/lib/capybara/node/base.rb:84:in `synchronize'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/capybara-2.5.0/lib/capybara/node/element.rb:134:in `click'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/capybara-2.5.0/lib/capybara/node/actions.rb:39:in `click_button'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/capybara-2.5.0/lib/capybara/session.rb:698:in `block (2 levels) in <class:Session>'
     # /Users/michael/.rvm/gems/ruby-2.1.4/gems/capybara-2.5.0/lib/capybara/dsl.rb:51:in `block (2 levels) in <module:DSL>'
     # ./spec/features/creating_projects_spec.rb:24:in `block (2 levels) in <top (required)>'

Finished in 0.24825 seconds (files took 1.51 seconds to load)
2 examples, 1 failure

Failed examples:

rspec ./spec/features/creating_projects_spec.rb:23 # Users can create new projects when providing invalid attributes

I've checked in my .rspec file in my project and --warnings is not listed. Is there another place to check for this? Is this just the default output for a failing test, or is there anyway I can fix this?

mikeLspohn
  • 495
  • 1
  • 8
  • 21
  • Did you ever find a solution? I'm having the same experience with my rspec no .rspec with --warnings in project, home or rvm – Rob Feb 17 '17 at 10:39

1 Answers1

0

Well it looks like you read this thread on SO, so I would check to see if you have --warnings turned on in global configuration file specifically in this location, ~/.rspec

Community
  • 1
  • 1
ipatch
  • 3,933
  • 8
  • 60
  • 99
  • Yeah I looked at that thread. And I don't have a `.rspec` file in my home directory. I'm using rvm I don't know if that makes any difference. Could the global config file be somewhere in the `.rvm` directory? I haven't been able to find one, but wasn't sure where to look. – mikeLspohn Sep 20 '15 at 00:16
  • @mikeLspohn try running the following, might take a minute though, `sudo find / -name '.rspec' 2>/dev/null` – ipatch Sep 20 '15 at 00:20
  • Well I have a long list of gem directories with `.rspec` files and some other like in homebrew. I've checked the homebrew ones and nothing and the ones in the gems that seemed relevant to the problem, but so far no good. Is this definitely caused by a `.rspec` file, or could there be anything else to look for that may be causing this? – mikeLspohn Sep 20 '15 at 03:09