Sha256: af71f0042e30a2b902e201573353f7a09a0d359505ed0058e447a2533aa79715

Contents?: true

Size: 465 Bytes

Versions: 1

Compression:

Stored size: 465 Bytes

Contents

require 'spec_helper'

describe District do
  it { is_expected.to be_a_kind_of InscriptioCursualis::District }

  it { is_expected.to belong_to(:city) }

  it { is_expected.to have_many(:neighborhoods).dependent(:restrict_with_exception) }

  it { is_expected.to validate_presence_of :name }
  it { is_expected.to validate_presence_of :city }

  it 'cast to string using name' do
    subject.name = 'Capelinha'

    expect(subject.to_s).to eq 'Capelinha'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
unico-training-7.8.0 spec/models/district_spec.rb