Sha256: 8eb48d5b387d42b9ab057e8c21080120f6d7912f5e039c1ddbdfe17e64837540
Contents?: true
Size: 612 Bytes
Versions: 2
Compression:
Stored size: 612 Bytes
Contents
shared_examples_for 'a command' do describe '#method_missing' do it 'forwards to relation and wraps response if it returned another relation' do new_command = command.with_params({}) expect(new_command).to be_instance_of(command.class) expect(new_command.relation).to eq(command.with_params({}).relation) end it 'returns original response if it was not a relation' do expect(command.name).to eq(command.relation.name) end it 'raises error when message is not known' do expect { command.not_here }.to raise_error(NoMethodError, /not_here/) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rom-http-0.1.2 | spec/shared/command_behaviour.rb |
rom-http-0.1.1 | spec/shared/command_behaviour.rb |