LoginSignup
0
0

More than 5 years have passed since last update.

テストにパスするbundle exec rspec spec/requests/static_pages_spec.rb

Posted at

ganshou-no-MacBook-Air:sample_app takako$ bundle exec rspec spec/requests/static_pages_spec.rb

FF

Failures:

1) Static pages Home page should have the content 'Sample App'
Failure/Error: visit '/static_pages/home'
ActionController::RoutingError:
No route matches [GET] "/static_pages/home"
# ./spec/requests/static_pages_spec.rb:8:in `block (3 levels) in '

2) Static pages Help page should have the content 'Help'
Failure/Error: visit '/static_pages/help'
ActionController::RoutingError:
No route matches [GET] "/static_pages/help"
# ./spec/requests/static_pages_spec.rb:16:in `block (3 levels) in '

Finished in 0.00746 seconds
2 examples, 2 failures

Failed examples:

rspec ./spec/requests/static_pages_spec.rb:7 # Static pages Home page should have the content 'Sample App'
rspec ./spec/requests/static_pages_spec.rb:15 # Static pages Help page should have the content 'Help'

Randomized with seed 54906

ない・・

$ subl config/routes.rb

SampleApp::Application.routes.draw do

end

何も入っていない

以下の2行を追加SampleApp::Application.routes.draw do
get "static_pages/home"
get "static_pages/help"
end

$ bundle exec rspec spec/requests/static_pages_spec.rb
..

Finished in 0.04232 seconds
2 examples, 0 failures

Randomized with seed 1420

成功!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0