I am trying to post an authenticate method:
post :authenticate, params:
{ 'email' => @user.email, 'password' => @user.password }
This user is created on before(:each)
but Rspec is considering email and password as methods and I get this error
NoMethodError:
undefined method `email' for #<Array:0x00559ddd541d18>
if I change @user.email and
@user.password
to string the test pass.
I would like to know if I can say to Rspec to consider .email
and .password
as attributes of user and not methods.
Aucun commentaire:
Enregistrer un commentaire