Better support for boolean values with Change matcher #54

wants to merge 1 commit into


None yet

2 participants

require 'spec_helper'

describe RSpec::Matchers::Change do
  it "passes successfully wrong change" do
    @a = true
    lambda {
      @a = 1
    }.should change { @a }.from(true).to(false)

That test should fail, but it passes. This bug was also affecting rspec 2, but was fixed with rspec/rspec-expectations@ecd24f5.

This is a backport of that fix.


@dchelimsky Any chance you'd pull this and release? We're still on rails 2.3 and rspec 1 and would be great if we didn't have to monkey patch :-) Thanks!


As I said in #53, I don't know when I'll have time for this. You don't have to monkey patch if you're using bundler - just point to github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment