Sha256: dcc3ed91b189603e0f33b7f35d724cbd602807bc093c8a02145536734ae9b122

Contents?: true

Size: 474 Bytes

Versions: 2

Compression:

Stored size: 474 Bytes

Contents

module SimpleCart
  RSpec.describe Delivery, type: :model do
    subject(:shipping) { Delivery.new(:company => 'Nova poshta', :costs => 42) }
    it 'should be a Delivery class' do
      expect(Delivery.is_a?(Class)).to be_truthy
      expect(Delivery < ActiveRecord::Base).to be_truthy
    end

    it { should have_db_column(:company).of_type(:string) }
    it { should have_db_column(:costs).of_type(:decimal) }

    it { should validate_presence_of(:company) }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
simple_cart-0.0.5 spec/models/simple_cart/delivery_spec.rb
simple_cart-0.0.4 spec/models/simple_cart/delivery_spec.rb