Sha256: e4da0c4d541b35a1ddcbc6294ad509a99a6563c4a11e9f7ec889f0d5d3dc9cfd
Contents?: true
Size: 620 Bytes
Versions: 30
Compression:
Stored size: 620 Bytes
Contents
require 'spec_helper' module RSpec module Matchers describe "expect(actual).to be_close(expected, delta)" do before(:each) do allow(RSpec).to receive(:deprecate) end it "is deprecated" do expect(RSpec).to receive(:deprecate).with(/be_close.*/, :replacement => "be_within(0.5).of(3.0)") be_close(3.0, 0.5) end it "delegates to be_within(delta).of(expected)" do should_receive(:be_within).with(0.5).and_return( be_within_matcher = double ) be_within_matcher.should_receive(:of).with(3.0) be_close(3.0, 0.5) end end end end
Version data entries
30 entries across 30 versions & 8 rubygems