[REQ_ERR: 404] [KTrafficClient] Something is wrong. Enable debug mode to see the reason.
Factory gril rspec assoication methods
How to create . Mar 29, · I'm using rspec and factory girl to develop an application which has users and each user has many media post. To go with TDD I'm using factory_girl. gadis pabrik (undefined method `symbolize_keys' when using factory girl traits) Rspec meneruskan file spesifikasi individu tetapi gagal di seluruh. . Jun 16, I am trying to test a helper method that would return the amount of I tried using Factory Girl association in my campaign factory. Since you're using the old dsl, I'd suggest two solutions: rainer-daus.de:business do |f| rainer-daus.dece (:name) { |n| "business_# {n}" } #try this: rainer-daus.deation (:user:factory =>:producer) #or this: rainer-daus.de_build { |biz| rainer-daus.de = rainer-daus.de (:producer) } end. The problem here is obviously linked to the creation of your producer association. 1 Answer. Sorted by: 1. Share Improve this answer answered Mar 29, at When running your tests, this will drive you to creating proper association in Media: class Media < ActiveRecord::Base belongs_to:user end After fulfilling this requirement, I would provide sufficient factories based on functionality we have, thus mentioned exception would not be thrown. Since you need not test the behavior of the other object, you can . Oct 14, · This RSpec-provided strategy is perfect for when you have a method that calls another object’s method(s). For older versions, use FactoryGirl instead of. Factory Bot is a helper for writing factories for Ruby tests. It was previously known as Factory Girl.