Sha256: 9b03019abd19df4ba4416d14fdb90307f0b02d763d040c93cb161f2940bb5e38
Contents?: true
Size: 945 Bytes
Versions: 38
Compression:
Stored size: 945 Bytes
Contents
require 'spec_helper' 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
38 entries across 38 versions & 1 rubygems