I\'m a little lost with RSpec having always stuck to xUnit-based testing frameworks, but I\'m giving it a go.
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
Hey all, I am having trouble testing the presence of form elements on my ruby on rails view. I am using rspec and have_selector to test.
I have a simple shopping cart app and I am trying to test the following method: def add(item_id) item = Product.find(item_id)
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 have installed the latest rspec gem and now every \'gem\' command, no matter what, throws this error:
Hoping someone might see what I\'ve overlooked... I\'m trying to get Capybara working in a small existing application...and I\'m not having any luck.
I have the following line in my create action of my teachers controller. @rating = @teacher.ratings.build(params[:rating]) unless params[:rating][:rating].blank?
Wha开发者_如何学JAVAt is the difference between a mock and a stub, they both seem very similar to me?
My create user method in the users_controller.rb looks like: def process_login is_login_valid(params[:user][:user_name], params[:user][:password])