Top "Rspec2" questions

RSpec 2 is a version of the Behaviour-Driven Development tool for Ruby programmers.

Scope constants to an rspec context

I often want to do context "empty stack" do SOME_CONSTANT = "value" it "should be empty" do # use SOME_CONSTANT …

rspec constants rspec2
Rails 3 and Rspec 2 turn off transactional fixtures for individual tests

I am in the process of upgrading my application to Rails 3. I started using Rspec 2 with Rails 3. I need to …

ruby-on-rails rspec rspec2
How can I stub find_each for rspec testing in rails 3

I was wondering how to test a find_each call in rspec. I'm used to simply stubbing what I want …

ruby-on-rails rspec rspec2
How can I mock super in ruby using rspec?

I am extending an existing library by creating a child class which extends to the library class. In the child …

ruby rspec rspec2
How to test routes with Rspec 2 in Rails 3?

I can't find anything explaining how to test routes in Rails 3. Even in the Rspec book, it doesn't explain well. …

ruby-on-rails-3 rspec2
stub_chain together with should_receive

I am trying to test if in a method calling chain one of the methods get a specific parameter. In …

ruby-on-rails rspec rspec2 stubbing
NameError: uninitialized constant in Rails app when testing with RSpec and Spork

I am trying to run my tests in my first Rails app using the following command in Terminal: rspec spec/ …

ruby-on-rails rspec2 spork
How to test scopes?

tried to find but with no success. Just wondering how could I test scopes in Rails 3. Could be using rspec, …

ruby-on-rails unit-testing ruby-on-rails-3 rspec2 shoulda
cannot load such file -- mocha/object (LoadError)

When I run rspec to test, I got this error: cannot load such file -- mocha/object (LoadError) The problem …

rspec ruby-on-rails-3.2 rspec2 spork ruby-mocha
RoR: testing an action that uses http token authentication

I'm trying to test a controller that's using an http token authentication in the before filter. My problem is that …

ruby-on-rails testing rspec2