Thursday 19 January 2017

RSpec failing after a new Rails Composer project



RSpec issues

Add
require 'rails_helper.rb'
into the spec files to allow the tests to run as expected.

spec/features/visitors/sign_up_spec.rb

The minimum password length is set to be 6 characters, but the 'expected fail' password was set to 'please', causing the test to fail.

Changed password to 'short' and test passes.

spec/features/users/sign_in_spec.rb

The tests were looking for an authentication_key of 'email'. Changed to 'Email' to match the results from Devise.

No comments:

Post a Comment