Sha256: 24274be36cce94c606ce7402e92c75087bbcb44aab8d7e688c112c941bdf8b79

Contents?: true

Size: 518 Bytes

Versions: 7

Compression:

Stored size: 518 Bytes

Contents

shared_examples 'a numerical type submatcher' do
  it 'implements the allowed_type method' do
    expect(subject).to respond_to(:allowed_type).with(0).arguments
    expect { subject.allowed_type }.not_to raise_error
  end

  it 'implements the diff_to_compare' do
    expect(subject).to respond_to(:diff_to_compare).with(0).arguments
    expect { subject.diff_to_compare }.not_to raise_error
  end

  it 'returns itself when given a message' do
    expect(subject.with_message('some message')).to eq subject
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/shoulda-matchers-2.8.0/spec/support/unit/shared_examples/numerical_type_submatcher.rb
shoulda-matchers-3.0.1 spec/support/unit/shared_examples/numerical_type_submatcher.rb
shoulda-matchers-3.0.0 spec/support/unit/shared_examples/numerical_type_submatcher.rb
shoulda-matchers-3.0.0.rc1 spec/support/unit/shared_examples/numerical_type_submatcher.rb
shoulda-matchers-2.8.0 spec/support/unit/shared_examples/numerical_type_submatcher.rb
shoulda-matchers-2.8.0.rc2 spec/support/unit/shared_examples/numerical_type_submatcher.rb
shoulda-matchers-2.8.0.rc1 spec/support/unit/shared_examples/numerical_type_submatcher.rb