Top "Rspec2" questions

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

Does an RSpec2 matcher for matching Hashes exist?

Note to future readers: think RSpec does not consider your Hashes equal? One might be an OrderedHash, but from the …

ruby hash rspec2 matcher
Upgrading to devise 3.1 => getting Reset password token is invalid

Solution Thanks to this gist form Steven Harman, I got it working. devise_mail_helpers.rb module Features module MailHelpers …

ruby-on-rails devise ruby-on-rails-4 factory-bot rspec2
How to pass an instance variable to an RSpec shared example

I'm using RSpec (2.10.1) to test validations on a model and have extracted some code to share with other model validations. …

ruby-on-rails rspec2
Stubbing Devise in rSpec and Rails3

How would you stub Devise in Rails 3 with rSpec. I have a UsersController and a User model. Both of which …

rspec ruby-on-rails-3 rspec2
How to create a model with a certain id using rspec and factory girl

I use: gem 'rails', '3.2.11' gem 'rspec-rails', '2.13.2' gem 'webrat', '0.7.3' gem 'factory_girl_rails', '4.1.0' …

ruby-on-rails ruby-on-rails-3 rspec2 factory-bot
Rspec: setting cookies in a helper test

Helper Method # Determine if this is user's first time def first_time? cookies[:first_time].nil? end Attempted Rspec test …

ruby-on-rails rspec rspec2
RSpec: comparing a hash with string keys against a hash with symbol keys?

Consider the following RSpec snippet: it "should match" do {:a => 1, :b => 2}.should =~ {"a" => 1, "b" => 2} end This …

ruby-on-rails ruby rspec2
Using implicit `subject` with `expect` in RSpec-2.11

With the new expect syntax in rspec-2.11, how is it possible to use the implicit subject? Is there a better …

ruby syntax rspec rspec2
Rspec 2 config :type types

In my spec_helper.rb I have config.include Devise::TestHelpers, :type => :controller so that I can actually test …

configuration devise helper rspec2