I\'m upgrading to rails 3 and rspec 2. I\'m getting the error \"undefined method `mock_model\'\" in my spec_helper. My current_user method sets up a mock user for authlogic and generates this error.
I am new to testing controllers with RSpec. In my controller, I have these methods: def edit @widget = Widget.find(params[:id])
I am using Rspec,开发者_JAVA技巧 webrat, selenium rc for tests. I am trying to do integration test with selenium and rspec.
I have the following in my controller: def create @board = Board.find(session[:board]) @greeting = @board.Greetings.build(params[:greeting])
I\'m trapped on one spec in RSpec. How can I update a model\'s attribute to make it nil? Is better to validate under update controller spec?
I\'m using: Rails 3.0.7 and Rspec 2.5.0 via rvm When I run this spec (using autotest or bundle exec autotest or bundle exec rspec spec/) below:
When a new user is created they are given a password. I want to test the case when the user updates or changes their password.
I\'ve got a pretty basic static method on an ActiveRecord model: #./app/models/comic.rb class Comic < ActiveRecord::Base
I have just gone through the process of upgrading a Rails 2.3.11 app that uses Tes开发者_StackOverflow中文版t Unit to Rails 3.1.rc4 and I have now set up rspec-rails 2.6.1.
I have a model as follows: class Greeting < ActiveRecord::Base attr_ac开发者_开发技巧cessible :headline, :icon, :content