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
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.
I have a simple controller test, containing a.o. the following code: context \"POST :create\" do before (:each) do
When I run a spec file (rspec spec/models/user_spec.rb) it prints something like 12 examples, 2 failures, 3 pending.
I have an almost-new Rails 3.1.0 application, and rspec can\'t find my examples. duncan@duncan-notebook:~/myapp$ bundle exec rspec
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.
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?
A project I\'m working on fetches data from a 3rd party service and caches it locally along with specific info for my app.
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
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)