Sha256: dc4d19d3beb1d8714c58741a392cda193500fa070bf6595b1c3dd6ab4a257357

Contents?: true

Size: 1.16 KB

Versions: 1

Compression:

Stored size: 1.16 KB

Contents

require_relative "helper/data_works_spec_helper"

describe TheDataWorks do
  let!(:data) { TheDataWorks.new }

  describe 'adding a record with a singluar name ending with the letter es' do
    describe 'adding a singluar address record' do
      it 'creates a new Address record' do
        expect { data.add_address }.to change(Address, :count).by(1)
      end
      it 'creates a new PetProfile record' do # require parent for Address
        expect { data.add_address }.to change(PetProfile, :count).by(1)
      end
      it 'creates a new Pet record' do # required parent for PetProfile
        expect { data.add_address }.to change(Pet, :count).by(1)
      end
    end

    describe 'adding multiple address records' do
      it 'creates three new Address records' do
        expect { data.add_addresses(3) }.to change(Address, :count).by(3)
      end
      it 'creates a new PetProfile record' do # require parent for Address
        expect { data.add_addresses(3) }.to change(PetProfile, :count).by(1)
      end
      it 'creates a new Pet record' do# required parent for PetProfile
        expect { data.add_addresses(3) }.to change(Pet, :count).by(1)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
data_works-0.1.1 spec/singluar_ending_in_es_spec.rb