質問編集履歴

1

エラー内容の追加

2019/12/31 14:08

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -88,6 +88,80 @@
88
88
 
89
89
  ```
90
90
 
91
+ 以下はエラーです
92
+
93
+ ```terminal
94
+
95
+ $ bundle exec rspec spec/system/tasks_spec.rb
96
+
97
+
98
+
99
+ (省略)
100
+
101
+ Failures:
102
+
103
+
104
+
105
+ 1) タスク管理機能 一覧表示機能 ユーザーAがログインしているとき ユーザーAが作成したタスクが表示される
106
+
107
+ Failure/Error: let(:user_a) {FactoryBot.create(:user, name: 'ユーザーA', email: 'a@example.com')}
108
+
109
+
110
+
111
+ ActiveRecord::RecordInvalid:
112
+
113
+ バリデーションに失敗しました: Email translation missing: ja.activerecord.errors.models.user.attributes.email.taken
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+ # ./spec/system/tasks_spec.rb:5:in `block (3 levels) in <top (required)>'
122
+
123
+ # ./spec/system/tasks_spec.rb:19:in `block (4 levels) in <top (required)>'
124
+
125
+ # ./spec/system/tasks_spec.rb:13:in `block (3 levels) in <top (required)>'
126
+
127
+
128
+
129
+ 2) タスク管理機能 一覧表示機能 ユーザーBがログインしている時 ユーザーAが作成したタスクが表示されない
130
+
131
+ Failure/Error: FactoryBot.create(:user, name: 'ユーザーB', email: 'b@example.com')
132
+
133
+
134
+
135
+ ActiveRecord::RecordInvalid:
136
+
137
+ バリデーションに失敗しました: Email translation missing: ja.activerecord.errors.models.user.attributes.email.taken
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ # ./spec/system/tasks_spec.rb:30:in `block (4 levels) in <top (required)>'
146
+
147
+
148
+
149
+ Finished in 3.37 seconds (files took 1.33 seconds to load)
150
+
151
+ 2 examples, 2 failures
152
+
153
+
154
+
155
+ Failed examples:
156
+
157
+
158
+
159
+ rspec ./spec/system/tasks_spec.rb:21 # タスク管理機能 一覧表示機能 ユーザーAがログインしているとき ユーザーAが作成したタスクが表示される
160
+
161
+ rspec ./spec/system/tasks_spec.rb:33 # タスク管理機能 一覧表示機能 ユーザーBがログインしている時 ユーザーAが作成したタスクが表示されない
162
+
163
+ ```
164
+
91
165
  エラーを見て、ja.ymlの翻訳が正しく行われていないのかと思いましたが、書いてある内容は入門書通りとなっておりました(タブの位置は違うかもしれません)。
92
166
 
93
167
  `taskleaf/config/locales/ja.yml`