Sha256: b21690996f88d7219a35c4a9c7f994457790c4820afd3d9e4b09e77d6df8f0a0
Contents?: true
Size: 668 Bytes
Versions: 11
Compression:
Stored size: 668 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe Zizia::TitleValidator do subject(:validator) { described_class.new(error_stream: []) } let(:invalid_parser) do FakeParser.new(file: [{ 'title' => 'moomin' }, {}, {}]) end it_behaves_like 'a Zizia::Validator' do let(:valid_parser) { FakeParser.new(file: [{ 'title' => 'moomin' }]) } end describe '#validate' do it 'populates errors for records with missing titles' do expect(validator.validate(parser: invalid_parser)) .to contain_exactly(an_instance_of(described_class::Error), an_instance_of(described_class::Error)) end end end
Version data entries
11 entries across 11 versions & 1 rubygems