ruby on rails - FactoryGirls randomly fails with 'Factory not registered', why? -
i've tests randomly fail, approx. 20% of times. means without changing code, each time run tests 1 time out of 5 fail "factory not registered" error. it's weird.. :( this consone output: failures: 1) unit#new_from_string returns factor metric conversions failure/error: factorygirl.create :taza argumenterror: factory not registered: taza # ./spec/models/unit_spec.rb:29:in `block (2 levels) in <top (required)>' finished in 0.29619 seconds 4 examples, 1 failure failed examples: rspec ./spec/models/unit_spec.rb:22 # unit#new_from_string returns factor metric conversions randomized seed 61727 and code: file: "unit_spec.rb" require 'spec_helper' describe unit, "#new_from_string" "parses string , returns unit object" [some tests...] factorygirl.find_definitions u = factorygirl.create :taza factorygirl.create :tbsp [tests...] end "returns factor metric...