Sha256: da655fac82746b5f07305139d520112b6148dda7e230310e1d3d0f2c8eeb58bf

Contents?: true

Size: 1.06 KB

Versions: 75

Compression:

Stored size: 1.06 KB

Contents

# frozen_string_literal: true

require 'aranha/parsers/source_target_fixtures'

RSpec.describe ::Aranha::Parsers::SourceTargetFixtures do
  let(:fixtures_dir) { ::File.join(__dir__, 'source_target_fixtures_spec_files') }
  let(:instance) { described_class.new(fixtures_dir) }

  describe '#source_target_files' do
    it { expect(instance.source_target_files.count).to eq(3) }

    (1..3).each do |index|
      basename = "stub#{index}"
      let(basename) { instance.source_target_files.find { |stf| stf.basename == basename } }

      it { expect(send(basename)).to be_present }
      it { expect(send(basename).basename).to eq(basename) }
    end

    it { expect(stub1.source).to eq(::File.join(fixtures_dir, 'stub1.source.txt')) }
    it { expect(stub1.target).to eq(::File.join(fixtures_dir, 'stub1.target.html')) }
    it { expect(stub2.source).to eq(::File.join(fixtures_dir, 'stub2.source.html')) }
    it { expect(stub2.target).to eq(nil) }
    it { expect(stub3.source).to eq(nil) }
    it { expect(stub3.target).to eq(::File.join(fixtures_dir, 'stub3.target.yaml')) }
  end
end

Version data entries

75 entries across 75 versions & 2 rubygems

Version Path
eac_tools-0.69.1 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.69.0 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.68.0 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.67.1 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.67.0 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.66.0 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.65.1 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.65.0 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.64.0 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.63.0 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.62.1 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.62.0 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.61.1 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.61.0 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.60.3 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.60.2 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.60.1 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.60.0 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.59.0 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb
eac_tools-0.58.0 sub/aranha-parsers/spec/lib/aranha/parsers/source_target_fixtures_spec.rb