質問編集履歴
1
丁寧な文書に加筆致しました。
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
|
1
|
+
bundle exec rspec spec/ テストがパスできません・・・
|
body
CHANGED
@@ -1,41 +1,50 @@
|
|
1
|
+
Ruby on Rails Tutorialに挑戦しているのですが、
|
1
|
-
|
2
|
+
見直して編集しなおしても下記のエラーによってテストがパスしません。
|
2
3
|
|
4
|
+
お手数ではございますが、お助けいただけないでしょうか。
|
3
|
-
|
5
|
+
どうぞ宜しくお願いいたします。
|
4
|
-
Ruby on Rails Tutorialを行っているのですが、5章の最後にエラーで
|
5
|
-
困っています。
|
6
6
|
|
7
|
-
|
7
|
+
パソコン名:sample_app ユーザー名$ bundle exec rspec spec/
|
8
|
-
|
8
|
+
*FF*F............................
|
9
9
|
|
10
10
|
Pending:
|
11
|
-
|
11
|
+
UsersHelper add some examples to (or delete) /Users/yamadashunsuke/rails_projects/sample_app/spec/helpers/users_helper_spec.rb
|
12
12
|
# No reason given
|
13
|
+
# ./spec/helpers/users_helper_spec.rb:14
|
14
|
+
StaticPagesHelper add some examples to (or delete) /Users/yamadashunsuke/rails_projects/sample_app/spec/helpers/static_pages_helper_spec.rb
|
15
|
+
# No reason given
|
13
16
|
# ./spec/helpers/static_pages_helper_spec.rb:14
|
14
17
|
|
15
18
|
Failures:
|
16
19
|
|
17
20
|
1) User pages signup page
|
18
21
|
Failure/Error: it { should have_title(full_title('Sign up')) }
|
19
|
-
NoMethodError:
|
20
|
-
|
22
|
+
expected #has_title?("Ruby on Rails Tutorial Sample App | Sign up") to return true, got false
|
21
23
|
# ./spec/requests/user_pages_spec.rb:11:in `block (3 levels) in <top (required)>'
|
22
24
|
|
25
|
+
2) User pages signup page
|
26
|
+
Failure/Error: it { should have_content('Sign up') }
|
27
|
+
expected #has_content?("Sign up") to return true, got false
|
28
|
+
# ./spec/requests/user_pages_spec.rb:10:in `block (3 levels) in <top (required)>'
|
29
|
+
|
23
|
-
|
30
|
+
3) StaticPagesController GET '...' returns http success
|
24
31
|
Failure/Error: get '...'
|
25
32
|
ActionController::UrlGenerationError:
|
26
33
|
No route matches {:action=>"...", :controller=>"static_pages"}
|
27
|
-
# ./spec/controllers/static_pages_controller_spec.rb:
|
34
|
+
# ./spec/controllers/static_pages_controller_spec.rb:7:in `block (3 levels) in <top (required)>'
|
28
35
|
|
29
|
-
Finished in 0.
|
36
|
+
Finished in 0.51877 seconds
|
30
|
-
|
37
|
+
33 examples, 3 failures, 2 pending
|
31
38
|
|
32
39
|
Failed examples:
|
33
40
|
|
34
41
|
rspec ./spec/requests/user_pages_spec.rb:11 # User pages signup page
|
42
|
+
rspec ./spec/requests/user_pages_spec.rb:10 # User pages signup page
|
35
|
-
rspec ./spec/controllers/static_pages_controller_spec.rb:
|
43
|
+
rspec ./spec/controllers/static_pages_controller_spec.rb:6 # StaticPagesController GET '...' returns http success
|
36
44
|
|
45
|
+
Randomized with seed 1912
|
37
46
|
|
38
|
-
|
47
|
+
**[ user_pages_spec.rbの中身 ]**
|
39
48
|
|
40
49
|
require 'spec_helper'
|
41
50
|
|
@@ -51,7 +60,8 @@
|
|
51
60
|
end
|
52
61
|
end
|
53
62
|
|
54
|
-
|
63
|
+
**[ static_pages_controller_spec.rbの中身 ]**
|
64
|
+
|
55
65
|
require 'spec_helper'
|
56
66
|
|
57
67
|
describe StaticPagesController do
|
@@ -65,10 +75,29 @@
|
|
65
75
|
|
66
76
|
end
|
67
77
|
|
68
|
-
|
78
|
+
**[ users_helper_specの中身 ]**
|
79
|
+
|
69
80
|
require 'spec_helper'
|
70
81
|
|
71
82
|
# Specs in this file have access to a helper object that includes
|
83
|
+
# the UsersHelper. For example:
|
84
|
+
#
|
85
|
+
# describe UsersHelper do
|
86
|
+
# describe "string concat" do
|
87
|
+
# it "concats two strings with spaces" do
|
88
|
+
# helper.concat_strings("this","that").should == "this that"
|
89
|
+
# end
|
90
|
+
# end
|
91
|
+
# end
|
92
|
+
describe UsersHelper do
|
93
|
+
pending "add some examples to (or delete) #{__FILE__}"
|
94
|
+
end
|
95
|
+
|
96
|
+
**[ static_pages_helper_spec.rbの中身 ]**
|
97
|
+
|
98
|
+
require 'spec_helper'
|
99
|
+
|
100
|
+
# Specs in this file have access to a helper object that includes
|
72
101
|
# the StaticPagesHelper. For example:
|
73
102
|
#
|
74
103
|
# describe StaticPagesHelper do
|
@@ -80,4 +109,11 @@
|
|
80
109
|
# end
|
81
110
|
describe StaticPagesHelper do
|
82
111
|
pending "add some examples to (or delete) #{__FILE__}"
|
83
|
-
end
|
112
|
+
end
|
113
|
+
|
114
|
+
申し訳ありませんが、お手上げな状態で><
|
115
|
+
どうかご教示のほど、よろしくお願いいたします。
|
116
|
+
|
117
|
+
また、いまいちspecの説明が自分の中で腑に落ちていないので
|
118
|
+
併せてご教示いただければ幸いです。
|
119
|
+
どうぞ宜しく御願い致します・
|