Sha256: 883a9196b99fbd470fe9285c102ecee652f369321a1b6892c0fb140300c3b894

Contents?: true

Size: 650 Bytes

Versions: 22

Compression:

Stored size: 650 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Zizia::TitleValidator do
  subject(:validator) { described_class.new }

  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

22 entries across 22 versions & 1 rubygems

Version Path
zizia-6.0.1 spec/zizia/title_validator_spec.rb
zizia-6.0.0 spec/zizia/title_validator_spec.rb
zizia-5.5.0 spec/zizia/title_validator_spec.rb
zizia-5.4.0 spec/zizia/title_validator_spec.rb
zizia-5.3.0 spec/zizia/title_validator_spec.rb
zizia-5.2.0 spec/zizia/title_validator_spec.rb
zizia-5.1.0 spec/zizia/title_validator_spec.rb
zizia-5.0.1 spec/zizia/title_validator_spec.rb
zizia-5.0.0 spec/zizia/title_validator_spec.rb
zizia-4.6.0.alpha.01 spec/zizia/title_validator_spec.rb
zizia-4.5.4.alpha.01 spec/zizia/title_validator_spec.rb
zizia-4.5.3.alpha.01 spec/zizia/title_validator_spec.rb
zizia-4.5.2.alpha.01 spec/zizia/title_validator_spec.rb
zizia-4.5.1.alpha.01 spec/zizia/title_validator_spec.rb
zizia-4.4.1.alpha.01 spec/zizia/title_validator_spec.rb
zizia-4.4.0.alpha.01 spec/zizia/title_validator_spec.rb
zizia-4.3.1.alpha.01 spec/zizia/title_validator_spec.rb
zizia-4.2.0.alpha.01 spec/zizia/title_validator_spec.rb
zizia-4.1.0.alpha.01 spec/zizia/title_validator_spec.rb
zizia-4.0.4.alpha.01 spec/zizia/title_validator_spec.rb