Closed yoshiakihiga closed 11 years ago
すみません。無意識でメイルにリプライ入れてました。。再送しますね。
spec/request/static_pages_spec.rb と spec/request/user_pages_spec.rb の二つで試験が失敗しています。 どちらかに絞って対応を検討してみてください。 少ない方から検討をしてみる方が良いかもしれないですね。
user_pages の方は
static_pages の方も config/routes.rb から定義が削除されている可能性が高いように見えます。
また、不具合が起きている状態で commit を作ってリモートに push してもらえるとこちらでも動作の確認ができます。push できたらこの Issue で連絡をください。
リスト6.21の後にテストを実行したらこうなりました
yoshiakihiga@yoshiakihiga-VirtualBox:~/rails_projects/sample_app$ bundle exec rspec spec/ FF.FFFFFFFFFFFF.......
Failures:
1) Static pages Home page Failure/Error: it { should have_selector('h1', text: 'Sample App') } expected css "h1" with text "Sample App" to return something
./spec/requests/static_pages_spec.rb:10:in `block (3 levels) in <top (required)>'
2) Static pages Home page Failure/Error: it { should have_selector('title', text: full_title('')) } NoMethodError: undefined method `full_title' for #
./spec/requests/static_pages_spec.rb:11:in`block (3 levels) in <top (required)>'
3) Static pages Help page Failure/Error: before { visit help_path } NameError: undefined local variable or method `help_path' for #
./spec/requests/static_pages_spec.rb:16:in`block (3 levels) in <top (required)>'
4) Static pages Help page Failure/Error: before { visit help_path } NameError: undefined local variable or method `help_path' for #
./spec/requests/static_pages_spec.rb:16:in`block (3 levels) in <top (required)>'
5) Static pages About page Failure/Error: before { visit about_path } NameError: undefined local variable or method `about_path' for #
./spec/requests/static_pages_spec.rb:23:in`block (3 levels) in <top (required)>'
6) Static pages About page Failure/Error: before { visit about_path } NameError: undefined local variable or method `about_path' for #
./spec/requests/static_pages_spec.rb:23:in`block (3 levels) in <top (required)>'
7) Static pages Contact page Failure/Error: before { visit contact_path } NameError: undefined local variable or method `contact_path' for #
./spec/requests/static_pages_spec.rb:30:in`block (3 levels) in <top (required)>'
8) Static pages Contact page Failure/Error: before { visit contact_path } NameError: undefined local variable or method `contact_path' for #
./spec/requests/static_pages_spec.rb:30:in`block (3 levels) in <top (required)>'
9) User pages profile page Failure/Error: let(:user) { FactoryGirl.create(:user) } NoMethodError: undefined method `password=' for #
./spec/requests/user_pages_spec.rb:8:in`block (3 levels) in <top (required)>'
10) User pages profile page Failure/Error: let(:user) { FactoryGirl.create(:user) } NoMethodError: undefined method `password=' for #
./spec/requests/user_pages_spec.rb:8:in`block (3 levels) in <top (required)>'
11) User pages signup page Failure/Error: before { visit signup_path } ActionView::MissingTemplate: Missing template users/new, application/new with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}. Searched in: * "/home/yoshiakihiga/rails_projects/sample_app/app/views"
./spec/requests/user_pages_spec.rb:16:in `block (3 levels) in <top (required)>'
12) User pages signup page Failure/Error: before { visit signup_path } ActionView::MissingTemplate: Missing template users/new, application/new with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}. Searched in: * "/home/yoshiakihiga/rails_projects/sample_app/app/views"
./spec/requests/user_pages_spec.rb:16:in `block (3 levels) in <top (required)>'
13) User pages profile page Failure/Error: before { visit user_path(user) } NameError: undefined local variable or method `user' for #
./spec/requests/user_pages_spec.rb:24:in`block (3 levels) in <top (required)>'
14) User pages profile page Failure/Error: before { visit user_path(user) } NameError: undefined local variable or method `user' for #
./spec/requests/user_pages_spec.rb:24:in`block (3 levels) in <top (required)>'
Finished in 0.8373 seconds 22 examples, 14 failures
Failed examples:
rspec ./spec/requests/static_pages_spec.rb:10 # Static pages Home page rspec ./spec/requests/static_pages_spec.rb:11 # Static pages Home page rspec ./spec/requests/static_pages_spec.rb:18 # Static pages Help page rspec ./spec/requests/static_pages_spec.rb:19 # Static pages Help page rspec ./spec/requests/static_pages_spec.rb:25 # Static pages About page rspec ./spec/requests/static_pages_spec.rb:26 # Static pages About page rspec ./spec/requests/static_pages_spec.rb:32 # Static pages Contact page rspec ./spec/requests/static_pages_spec.rb:33 # Static pages Contact page rspec ./spec/requests/user_pages_spec.rb:11 # User pages profile page rspec ./spec/requests/user_pages_spec.rb:12 # User pages profile page rspec ./spec/requests/user_pages_spec.rb:18 # User pages signup page rspec ./spec/requests/user_pages_spec.rb:19 # User pages signup page rspec ./spec/requests/user_pages_spec.rb:26 # User pages profile page rspec ./spec/requests/user_pages_spec.rb:27 # User pages profile page
Randomized with seed 63346