blob: d8e2b617e0ec2a6ea443dd44d450355924e60aa5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe SignatureType do
describe '#type' do
context 'when class does not define a type method' do
subject(:implementation) { Class.new.include(described_class).new }
it 'raises a NoMethodError with custom message' do
expect { implementation.type }.to raise_error(NoMethodError, 'must implement `type` method')
end
end
end
end
|