How can i create a fixture for ActsAsTaggableOn::tag Using FactoryGirl ?
I tried :
/spec/factories/tags.rb
Factory.define ActsAsTaggableOn::Tag do |f|
f.sequence(:name) { |n| "titre#{n}" }
end
/spec/controllers/books_controller.rb
it "should return 2 categories whith books" do
fake_tag = Factory(:tag)
...
end
I get :
Failure/Error: fake_tag = Factory(:tag)
ArgumentError:
Factory not registered: tag
Thanks for your help, Vincent