Here is my helper method which I want to test. def posts_correlation(name) if name.present? author = User.find_by_name(name)
I am using rails 3.0 and factor开发者_运维百科y_girl 1.3. I have 2 factories in my factories.rb file which are as follows:-
In my model(Product) i have a validation, that each product should have a valid owner (login_id of user)
I am using the cucumber step definitons provided by factory girl and I can not get something to work here.
If I have 2 models - eg. Shop and Brand and i want to model the shop having between say, 3 - 10 brands, what is a good way to do that using factory girl?
I have a very strange problem and I don\'t know where I should look to find it. I am developing a rails 3 app using rspec and factory girl for testing. For some reason, whenever I run any rails comman
Well, I have the following in factories.rb Factory.alias /(.*_)confirmation/, \"\\1\" Factory.define :user do |f|
I have the following Factory definition. Factory.define :status do |f| end Factory.define :my_status , :parent => :status do |f|
I\'m using cucumber and factory girl with very good results, but I\'m finding that the syntax is a little bit forced.
Suppose I have a model user, which has a uniqueness constraint on the email field If I call Factory(:user) once all is well, but if I call it a second time it\'ll fail with an \"entry already exists\