Better support for boolean values with Change matcher #54

Open
wants to merge 1 commit into
from

Projects

None yet

2 participants

@ngan
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)
  end
end

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.

@ngan

@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!

@dchelimsky
Owner

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