Sha256: 01d59dc2d3c5140073e887dce8c429a15270af5351d68fa028727bcd01d2a832

Contents?: true

Size: 541 Bytes

Versions: 9

Compression:

Stored size: 541 Bytes

Contents

require 'spec_helper'

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

9 entries across 9 versions & 2 rubygems

Version Path
shoulda-matchers-2.7.0 spec/support/shared_examples/numerical_type_submatcher.rb
shoulda-matchers-2.6.2 spec/support/shared_examples/numerical_type_submatcher.rb
mcmire-shoulda-matchers-2.6.2.docs.1 spec/support/shared_examples/numerical_type_submatcher.rb
mcmire-shoulda-matchers-2.6.1.docs.1 spec/support/shared_examples/numerical_type_submatcher.rb
shoulda-matchers-2.6.1 spec/support/shared_examples/numerical_type_submatcher.rb
shoulda-matchers-2.6.1.rc2 spec/support/shared_examples/numerical_type_submatcher.rb
shoulda-matchers-2.6.1.rc1 spec/support/shared_examples/numerical_type_submatcher.rb
shoulda-matchers-2.6.0 spec/support/shared_examples/numerical_type_submatcher.rb
mcmire-shoulda-matchers-2.5.0 spec/support/shared_examples/numerical_type_submatcher.rb