Sha256: b557ae10cff0173028f0a16cfd292e7bea2fbbace6b2c6f39638b5b4bca65ff9

Contents?: true

Size: 427 Bytes

Versions: 16

Compression:

Stored size: 427 Bytes

Contents

shared_examples_for 'coerces inet column type to string' do |column|
  raise ArgumentError, 'must pass the column name' unless column

  context 'with an inet column' do
    let(:address) { '10.0.0.1' }

    before(:each) do
      subject.update_attribute column, address
    end

    it 'should cast the column as a string when fetching from the database' do
      expect(subject.send(column)).to eq(address)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
metasploit_data_models-1.2.10 spec/support/shared/examples/coerces_inet_column_type_to_string.rb
metasploit_data_models-1.2.9 spec/support/shared/examples/coerces_inet_column_type_to_string.rb
metasploit_data_models-1.2.8 spec/support/shared/examples/coerces_inet_column_type_to_string.rb
metasploit_data_models-1.2.7 spec/support/shared/examples/coerces_inet_column_type_to_string.rb
metasploit_data_models-1.2.6 spec/support/shared/examples/coerces_inet_column_type_to_string.rb
metasploit_data_models-1.2.5 spec/support/shared/examples/coerces_inet_column_type_to_string.rb
metasploit_data_models-1.2.4 spec/support/shared/examples/coerces_inet_column_type_to_string.rb
metasploit_data_models-1.2.3 spec/support/shared/examples/coerces_inet_column_type_to_string.rb
metasploit_data_models-1.2.2 spec/support/shared/examples/coerces_inet_column_type_to_string.rb
metasploit_data_models-1.2.1 spec/support/shared/examples/coerces_inet_column_type_to_string.rb
metasploit_data_models-1.2.0 spec/support/shared/examples/coerces_inet_column_type_to_string.rb
metasploit_data_models-1.1.0 spec/support/shared/examples/coerces_inet_column_type_to_string.rb
metasploit_data_models-1.0.1 spec/support/shared/examples/coerces_inet_column_type_to_string.rb
metasploit_data_models-1.0.0 spec/support/shared/examples/coerces_inet_column_type_to_string.rb
metasploit_data_models-1.0.0.pre.rails.pre.4.0b spec/support/shared/examples/coerces_inet_column_type_to_string.rb
metasploit_data_models-1.0.0.pre.rails.pre.4.0a spec/support/shared/examples/coerces_inet_column_type_to_string.rb