Refinery FactoryGirl

15 views
Skip to first unread message

Surajit Dey

unread,
Feb 18, 2016, 1:46:40 AM2/18/16
to Refinery CMS
Hi,

I've added factory girl which used in spec file. But when I run the Rsepc it always showing the below error:
ArgumentError:
       Factory not registered: User

In the spec_helper.rb I've wrote the following setup.

ENV["RAILS_ENV"] ||= 'test'

require 'capybara/rspec'
require 'factory_girl_rails'

RSpec.configure do |config|
  config.include FactoryGirl::Syntax::Methods
  config.expect_with :rspec do |expectations|
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end

  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
  end
  config.tty = true
end

Please advise some solution to fix this, its very urgent.



Reply all
Reply to author
Forward
0 new messages