質問編集履歴
2
追記があった為
title
CHANGED
File without changes
|
body
CHANGED
@@ -2,7 +2,8 @@
|
|
2
2
|
言語 ruby
|
3
3
|
FW ruby on rails
|
4
4
|
|
5
|
-
(初心者でなおかつ独学の為、根本的な所から違う場合あります。すみません。
|
5
|
+
(初心者でなおかつ独学の為、根本的な所から違う場合あります。すみません。
|
6
|
+
勘違いが多すぎて何処から突っ込めばいいかわからない場合は、とりあえず『エラーの解決方法』と『どう判断したか』のみで大丈夫です。)
|
6
7
|
## 前提・実現したいこと
|
7
8
|
rails test:models実行時に出てくる
|
8
9
|
ArgumentError: wrong number of arguments (given A, expected B)のA,Bの判断方法が知りたいです。
|
1
仕切り棒の追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -47,6 +47,8 @@
|
|
47
47
|
わからない・・・。
|
48
48
|
====================
|
49
49
|
|
50
|
+
|
51
|
+
|
50
52
|
### エラーコード
|
51
53
|
|
52
54
|
Running:
|
@@ -58,7 +60,11 @@
|
|
58
60
|
ArgumentError: wrong number of arguments (given 1, expected 2)
|
59
61
|
test/models/user_test.rb:41:in `test'
|
60
62
|
test/models/user_test.rb:41:in `block in <class:UserTest>'
|
63
|
+
|
64
|
+
|
65
|
+
|
61
|
-
|
66
|
+
### ソースコード
|
67
|
+
|
62
68
|
ファイル名 user_test.rb
|
63
69
|
|
64
70
|
test "email validation should accept valid addresses" do
|
@@ -74,5 +80,4 @@
|
|
74
80
|
class User < ApplicationRecord
|
75
81
|
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+.[a-z]+\z/i
|
76
82
|
format: { with: VALID_EMAIL_REGEX }
|
77
|
-
end
|
83
|
+
end
|
78
|
-
###
|