mercredi 26 septembre 2018

Routing Error in feature testing with RSpec

I'm working on a Project and trying to write some tests for it. At the Moment i'm doing the feature tests.
The Problem: I just can't use visit. Doesn't matter where i am using it. I receive the error: ActionController::RoutingError: No route matches [GET] "/".

Here is a simple example of the test:
require 'rails_helper'

RSpec.feature "Welcome", type: :feature do
  context 'sign in user and load index' do
    visit new_user_session_path  #didn't worked with "/" nor "/login" either
  end
end

May it's a problem with RSpec? I just don't know how to fix it.

I'm really glad if someone would try to help me.

Aucun commentaire:

Enregistrer un commentaire