質問編集履歴
1
エラー内容の追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -43,6 +43,43 @@
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
```
|
46
|
+
以下はエラーです
|
47
|
+
```terminal
|
48
|
+
$ bundle exec rspec spec/system/tasks_spec.rb
|
49
|
+
|
50
|
+
(省略)
|
51
|
+
Failures:
|
52
|
+
|
53
|
+
1) タスク管理機能 一覧表示機能 ユーザーAがログインしているとき ユーザーAが作成したタスクが表示される
|
54
|
+
Failure/Error: let(:user_a) {FactoryBot.create(:user, name: 'ユーザーA', email: 'a@example.com')}
|
55
|
+
|
56
|
+
ActiveRecord::RecordInvalid:
|
57
|
+
バリデーションに失敗しました: Email translation missing: ja.activerecord.errors.models.user.attributes.email.taken
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
# ./spec/system/tasks_spec.rb:5:in `block (3 levels) in <top (required)>'
|
62
|
+
# ./spec/system/tasks_spec.rb:19:in `block (4 levels) in <top (required)>'
|
63
|
+
# ./spec/system/tasks_spec.rb:13:in `block (3 levels) in <top (required)>'
|
64
|
+
|
65
|
+
2) タスク管理機能 一覧表示機能 ユーザーBがログインしている時 ユーザーAが作成したタスクが表示されない
|
66
|
+
Failure/Error: FactoryBot.create(:user, name: 'ユーザーB', email: 'b@example.com')
|
67
|
+
|
68
|
+
ActiveRecord::RecordInvalid:
|
69
|
+
バリデーションに失敗しました: Email translation missing: ja.activerecord.errors.models.user.attributes.email.taken
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
# ./spec/system/tasks_spec.rb:30:in `block (4 levels) in <top (required)>'
|
74
|
+
|
75
|
+
Finished in 3.37 seconds (files took 1.33 seconds to load)
|
76
|
+
2 examples, 2 failures
|
77
|
+
|
78
|
+
Failed examples:
|
79
|
+
|
80
|
+
rspec ./spec/system/tasks_spec.rb:21 # タスク管理機能 一覧表示機能 ユーザーAがログインしているとき ユーザーAが作成したタスクが表示される
|
81
|
+
rspec ./spec/system/tasks_spec.rb:33 # タスク管理機能 一覧表示機能 ユーザーBがログインしている時 ユーザーAが作成したタスクが表示されない
|
82
|
+
```
|
46
83
|
エラーを見て、ja.ymlの翻訳が正しく行われていないのかと思いましたが、書いてある内容は入門書通りとなっておりました(タブの位置は違うかもしれません)。
|
47
84
|
`taskleaf/config/locales/ja.yml`
|
48
85
|
```
|