# encoding: utf-8 require 'spec_helper' shared_examples_for 'an RSpec matcher' do |options| let(:valid_value) { options.fetch(:valid_value) } let(:invalid_value) { options.fetch(:invalid_value) } context 'when using #== so it can be composed' do it 'matches a valid value' do expect(matcher).to eq(valid_value) end it 'does not match an invalid value' do expect(matcher).not_to eq(invalid_value) end end end