rspec2
Why does the "each" iterator method break rspec?
Background I\'m attempting to test my models. app/models/user.rb class User < ActiveRecord::Base has_many :payor_transactions, class_name: \'Transaction\', inverse_of: :payor, foreign_key: :pay[详细]
2023-04-12 08:05 分类:问答Sinatra + Rack::Test + Rspec2 - Using Sessions?
It\'s the first time I\'m working with Sinatra and I just can\'t get sessions to work in my tests. I have enable :sessions in my app.[详细]
2023-04-11 20:02 分类:问答Speeding up rspec controllers test: using before all fails?
I have a simple controller test, containing a.o. the following code: context \"POST :create\" do before (:each) do[详细]
2023-04-11 00:23 分类:问答Finding out how many examples are in a spec file
When I run a spec file (rspec spec/models/user_spec.rb) it prints something like 12 examples, 2 failures, 3 pending.[详细]
2023-04-10 05:10 分类:问答rspec isn't finding examples
I have an almost-new Rails 3.1.0 application, and rspec can\'t find my examples. duncan@duncan-notebook:~/myapp$ bundle exec rspec[详细]
2023-04-09 17:21 分类:问答Trouble on initializing a factory object
I am using Ruby on Rails 3.1.0, rspec-rails 2 and Factory gems. I have some trouble related to the validation process when I state a Factory object 开发者_开发知识库for an Account class.[详细]
2023-04-09 15:32 分类:问答is view spec necessary with cucumber
Is it necessary to use view spec even if I am using cucumber? I think cucumber takes care of the view and the flow.So is it required to use view spec?[详细]
2023-04-09 11:42 分类:问答How to test a scenario that requires javascript to complete?
A project I\'m working on fetches data from a 3rd party service and caches it locally along with specific info for my app.[详细]
2023-04-09 10:22 分类:问答How should I test class objects inside mailer files?
I am using Ruby on Rails 3.1.0, rspec-rails 2 and DelajdJob gems. In order to test if an e-mail is sent when a user signed up I am trying to test a delayed email but I have some trouble\\doubt (not di[详细]
2023-04-09 04:44 分类:问答Assert multiple change expectations within a single lambda request
I have a test like that: lambda { post(\"/api/users\", parameters) }.should change(User,:count).by(1) lambda { post(\"/api/users\", parameters) }.should_not change(ActionMailer::Base, :deliveries)[详细]
2023-04-08 20:28 分类:问答