Top "Rspec" questions

RSpec is a behavior-driven development (BDD) framework for the Ruby programming language, inspired by JBehave.

Rspec doesn't see my model Class. uninitialized constant error

I'm writing tests on Rspec for my models in Ruby on Rails application. And I receive this error while starting …

ruby-on-rails testing model rspec
capybara assert attributes of an element

I'm using RSpec2 and Capybara for acceptance testing. I would like to assert that link is disabled or not in …

ruby-on-rails rspec capybara
rspec 3 - stub a class method

I am upgrading from rspec 2.99 to rspec 3.0.3 and have converted instance methods to use allow_any_instance_of, but haven't …

ruby-on-rails ruby rspec rspec3
Using Rspec, how do I test the JSON format of my controller in Rails 3.0.11?

I've scoured the web, but, alas, I just can't seem to get Rspec to correctly send content-type so I can …

ruby-on-rails json api header rspec
Rspec: "array.should == another_array" but without concern for order

I often want to compare arrays and make sure that they contain the same elements, in any order. Is there …

ruby testing rspec
how to test params passed into a controller in rails 3, using rspec?

Our code: describe "GET show" do it "assigns the requested subcategory as @subcategory" do subcategory = Subcategory.create! valid_attributes get :…

ruby-on-rails rspec
Capybara: How do I fill in a input field by its ID

I have this: <input class="string optional" id="course_group_courses_attributes_2_name" name="course_group[courses_attributes][2][name]" …

rspec capybara
Running ruby debug in rspec?

I'm trying to get Ruby debugger running in one of my specs: describe User do it "should be valid" do …

ruby-on-rails rspec rake ruby-debug
Rails 3.1, RSpec: testing model validations

I have started my journey with TDD in Rails and have run into a small issue regarding tests for model …

ruby-on-rails ruby-on-rails-3 rspec rspec2 rspec-rails
How to say "should_receive" more times in RSpec

I have this in my test Project.should_receive(:find).with(@project).and_return(@project) but when object receive that …

ruby-on-rails rspec