rspec2
How to use mock_model in spec_helper (for use with Authlogic)
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.[详细]
2023-03-18 06:13 分类:问答Are these controller specs good enough?
I am new to testing controllers with RSpec. In my controller, I have these methods: def edit @widget = Widget.find(params[:id])[详细]
2023-03-17 11:58 分类:问答rspec test using regular database not test database
I am using Rspec,开发者_JAVA技巧 webrat, selenium rc for tests. I am trying to do integration test with selenium and rspec.[详细]
2023-03-17 11:25 分类:问答set session for object in Rspec integration test
I have the following in my controller: def create @board = Board.find(session[:board]) @greeting = @board.Greetings.build(params[:greeting])[详细]
2023-03-17 10:31 分类:问答How to Update an Attribute in Testing Model Using RSpec
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?[详细]
2023-03-17 04:16 分类:问答"Suddenly" am getting an Invalid Subclass Error when calling YAML.load_file
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:[详细]
2023-03-17 02:30 分类:问答how to test password length on update of password
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.[详细]
2023-03-17 02:14 分类:问答RSpec 2 speccing a static ActiveRecord method
I\'ve got a pretty basic static method on an ActiveRecord model: #./app/models/comic.rb class Comic < ActiveRecord::Base[详细]
2023-03-16 17:17 分类:问答After Rails 3 upgrade rake db:test:prepare not working?
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.[详细]
2023-03-16 15:25 分类:问答how can I test accepts_nested_attributes_for with Rspec Rails3
I have a model as follows: class Greeting < ActiveRecord::Base attr_ac开发者_开发技巧cessible :headline, :icon, :content[详细]
2023-03-16 10:26 分类:问答