Sha256: d77b5a11c12f5e30ffe4ae8abafff3639cbb072eaa2f438e89042e8884d011b9

Contents?: true

Size: 744 Bytes

Versions: 26

Compression:

Stored size: 744 Bytes

Contents

# frozen_string_literal: true

require 'eac_fs/comparator'
require 'eac_ruby_utils/core_ext'

RSpec.shared_examples 'avm_source_generated' do |spec_file, stereotype, options = {}|
  fixtures_dir = Pathname.new('base_spec_files').expand_path(File.dirname(spec_file))

  fixtures_dir.children.select(&:directory?).each do |target_dir|
    context "when target is \"#{target_dir.basename}\"" do
      let(:source) { avm_source(stereotype, options.merge(target_basename: target_dir.basename)) }

      it do
        expect(fs_comparator.build(source.path)).to eq(fs_comparator.build(target_dir))
      end
    end
  end

  # @return [EacFs::Comparato]
  def fs_comparator
    EacFs::Comparator.new.rename_file('.gitignore', '_gitignore')
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
avm-0.90.1 lib/avm/rspec/shared_examples/avm_source_generated.rb
eac_tools-0.87.1 sub/avm/lib/avm/rspec/shared_examples/avm_source_generated.rb
avm-0.90.0 lib/avm/rspec/shared_examples/avm_source_generated.rb
eac_tools-0.87.0 sub/avm/lib/avm/rspec/shared_examples/avm_source_generated.rb
avm-0.89.0 lib/avm/rspec/shared_examples/avm_source_generated.rb
eac_tools-0.86.12 sub/avm/lib/avm/rspec/shared_examples/avm_source_generated.rb
avm-0.88.0 lib/avm/rspec/shared_examples/avm_source_generated.rb
eac_tools-0.86.11 sub/avm/lib/avm/rspec/shared_examples/avm_source_generated.rb
avm-0.87.0 lib/avm/rspec/shared_examples/avm_source_generated.rb
eac_tools-0.86.8 sub/avm/lib/avm/rspec/shared_examples/avm_source_generated.rb
avm-0.86.2 lib/avm/rspec/shared_examples/avm_source_generated.rb
eac_tools-0.86.7 sub/avm/lib/avm/rspec/shared_examples/avm_source_generated.rb
avm-0.86.1 lib/avm/rspec/shared_examples/avm_source_generated.rb
eac_tools-0.86.5 sub/avm/lib/avm/rspec/shared_examples/avm_source_generated.rb
avm-0.86.0 lib/avm/rspec/shared_examples/avm_source_generated.rb
eac_tools-0.86.4 sub/avm/lib/avm/rspec/shared_examples/avm_source_generated.rb
eac_tools-0.86.3 sub/avm/lib/avm/rspec/shared_examples/avm_source_generated.rb
avm-0.85.0 lib/avm/rspec/shared_examples/avm_source_generated.rb
eac_tools-0.86.2 sub/avm/lib/avm/rspec/shared_examples/avm_source_generated.rb
avm-0.84.3 lib/avm/rspec/shared_examples/avm_source_generated.rb