Sha256: 937c68005a7bfd1d633d42a9ef3561e0b4a3856e57502a85fe34dbe2c918c48c
Contents?: true
Size: 934 Bytes
Versions: 22
Compression:
Stored size: 934 Bytes
Contents
RSpec.describe Metasploit::Model::Association::Error do context '#initialize' do let(:attributes) do { :model => model, :name => :associated_things } end let(:model) do Class.new end context 'without :model' do before(:example) do attributes.delete(:model) end it 'should raise KeyError' do expect { described_class.new(attributes) }.to raise_error(KeyError) end end context 'without :name' do before(:example) do attributes.delete(:name) end it 'should raise KeyError' do expect { described_class.new(attributes) }.to raise_error(KeyError) end end context 'with :model and :name' do it 'should not raise error' do expect { described_class.new(attributes) }.to_not raise_error end end end end
Version data entries
22 entries across 22 versions & 1 rubygems