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

Version Path
zizia-2.1.0.alpha.09 spec/zizia/title_validator_spec.rb
zizia-2.1.0.alpha.08 spec/zizia/title_validator_spec.rb
zizia-2.1.0.alpha.07 spec/zizia/title_validator_spec.rb
zizia-2.1.0.alpha.06 spec/zizia/title_validator_spec.rb
zizia-2.1.0.alpha.05 spec/zizia/title_validator_spec.rb
zizia-2.1.0.alpha.04 spec/zizia/title_validator_spec.rb
zizia-2.1.0.alpha.03 spec/zizia/title_validator_spec.rb
zizia-2.1.0.alpha.02 spec/zizia/title_validator_spec.rb
zizia-2.1.0.alpha.01 spec/zizia/title_validator_spec.rb
zizia-2.0.0.alpha.01 spec/zizia/title_validator_spec.rb
zizia-1.0.1 spec/zizia/title_validator_spec.rb