I have a factory, for example:
FactoryGirl.define do factory :page do title 'Fake Title For Page' end end
And the test:
describe "LandingPages" do it "should load the landing page with the correct data" do page = FactoryGirl.create(:page) visit page_path(page) end end
My spec_helper.rb contains:
require 'factory_girl_rails'
and yet I keep getting:
LandingPages should load the landing page with the correct data Failure/Error: page = FactoryGirl.create(:page) NameError: uninitialized constant Page
This is a new project, so I do not think that the test is actually a problem. I believe this may be misconfigured. Any ideas on what to try and / or where to look for a solution?
My unprecedented pages.rb file:
class Pages < ActiveRecord::Base
Noah clark
source share