I\'ve inherited an old Rails2.3 app. It\'s very complex and has (shock, horror) no tests whatsoever. I\'m used to rspec and cucumber so I thought I\'d start working on getting specs and features defin
I found g开发者_StackOverflow社区ood solution, with factory_girl extension here: Using factory_girl in Rails with associations that have unique constraints. Getting duplicate errors
My controll开发者_开发知识库er spec fails because Factory Girl seems to be creating non-unique Users even though I sequence the User attributes that need to be unique.
I\'m upgrading my rails 2 app to rails 3. I use rspec, shoulda and factory girl in the test suite. One particular pattern is causing an error I\'m having a really hard time both researching and solvi
I have this setup in the factories开发者_如何学编程.rb. Factory.sequence(:email) { |n| \"email#{n}@factory.com\" }
I have 2 factories. Beta_user and Beta_invite. Basically before a Beta_user can validly save I have to create an entry of Beta_invite. Unfortunately these models don\'t have clean associations, but th
I\'m using factory girl with rspec, here is what I have: factories.rb Factory.define :user do |f| f.sequence(:fname) { |n| \"fname#{n}\" }
I am setting up my first app with Mongoid and Devise. I am trying to Factory a user in my test with this factory:
This question already has answers here: How Do I Use Factory Girl To Generate A Paperclip Attachment? 开发者_JAVA百科
I have a model # == Schema Information # # Table name: posts # #id:integernot null, primary key #name:string(255)