Sha256: 1f47b794b72dedd5312e7af854cbac1e9c6f2f96688fccdc47e0f85bf026864d

Contents?: true

Size: 581 Bytes

Versions: 221

Compression:

Stored size: 581 Bytes

Contents

require 'spec_helper'

module RSpec
  module Matchers
    describe "[actual.should] be_close(expected, delta)" do
      before(:each) do
        RSpec.stub(:warn)
      end

      it "delegates to be_within(delta).of(expected)" do
        should_receive(:be_within).with(0.5).and_return( be_within_matcher = stub )
        be_within_matcher.should_receive(:of).with(3.0)
        be_close(3.0, 0.5)
      end

      it "prints a deprecation warning" do
        RSpec.should_receive(:warn).with(/please use be_within.*instead/)
        be_close(3.0, 0.5)
      end
    end
  end
end

Version data entries

221 entries across 120 versions & 17 rubygems

Version Path
librarian-puppet-0.9.9 vendor/gems/ruby/1.9.1/gems/rspec-expectations-2.12.1/spec/rspec/matchers/be_close_spec.rb
remq-0.0.4 vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/be_close_spec.rb
remq-0.0.3 vendor/bundle/gems/rspec-expectations-2.12.1/spec/rspec/matchers/be_close_spec.rb
librarian-puppet-0.9.8 vendor/gems/ruby/1.9.1/gems/rspec-expectations-2.12.1/spec/rspec/matchers/be_close_spec.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/rspec-expectations-2.10.0/spec/rspec/matchers/be_close_spec.rb
classiccms-0.6.9 vendor/bundle/gems/rspec-expectations-2.10.0/spec/rspec/matchers/be_close_spec.rb
classiccms-0.6.9 vendor/bundle/gems/rspec-expectations-2.9.0/spec/rspec/matchers/be_close_spec.rb
classiccms-0.6.9 vendor/bundle/gems/rspec-expectations-2.9.1/spec/rspec/matchers/be_close_spec.rb
rspec-expectations-2.12.1 spec/rspec/matchers/be_close_spec.rb
rspec-expectations-2.12.0 spec/rspec/matchers/be_close_spec.rb
classiccms-0.6.8 vendor/bundle/gems/rspec-expectations-2.10.0/spec/rspec/matchers/be_close_spec.rb
classiccms-0.6.8 vendor/bundle/gems/rspec-expectations-2.9.1/spec/rspec/matchers/be_close_spec.rb
classiccms-0.6.8 vendor/bundle/gems/rspec-expectations-2.9.0/spec/rspec/matchers/be_close_spec.rb
classiccms-0.6.7 vendor/bundle/gems/rspec-expectations-2.10.0/spec/rspec/matchers/be_close_spec.rb
classiccms-0.6.7 vendor/bundle/gems/rspec-expectations-2.9.0/spec/rspec/matchers/be_close_spec.rb
classiccms-0.6.7 vendor/bundle/gems/rspec-expectations-2.9.1/spec/rspec/matchers/be_close_spec.rb
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/rspec-expectations-2.11.3/spec/rspec/matchers/be_close_spec.rb
classiccms-0.6.6 vendor/bundle/gems/rspec-expectations-2.10.0/spec/rspec/matchers/be_close_spec.rb
classiccms-0.6.6 vendor/bundle/gems/rspec-expectations-2.9.0/spec/rspec/matchers/be_close_spec.rb
classiccms-0.6.6 vendor/bundle/gems/rspec-expectations-2.9.1/spec/rspec/matchers/be_close_spec.rb