Sha256: 7345c1e3a310c587ade26292ae543742e1e159f2ed5f4d091c9277a69bc4c62a
Contents?: true
Size: 928 Bytes
Versions: 8
Compression:
Stored size: 928 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(:each) 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(:each) 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
8 entries across 8 versions & 1 rubygems