Sha256: 7f7b09e6e41b7148230493e1cd56e2f8e6de0f6587c99ded8199c9fa13dd488a

Contents?: true

Size: 535 Bytes

Versions: 6

Compression:

Stored size: 535 Bytes

Contents

# frozen_string_literal: true

require 'ultimate_lyrics/parser'
require 'ultimate_lyrics/provider'

::RSpec.describe ::UltimateLyrics::Parser do
  include_examples 'source_target_fixtures', __FILE__

  def source_data(source_file)
    parser = described_class.new(
      provider_by_basename(::File.basename(source_file)),
      ::File.read(source_file)
    )
    { url: parser.url?, result: parser.result }
  end

  def provider_by_basename(basename)
    ::UltimateLyrics::Provider.by_identifier(basename.split('__').first)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ehbrs-tools-0.28.3 vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec.rb
ehbrs-tools-0.28.2 vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec.rb
ehbrs-tools-0.28.1 vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec.rb
ehbrs-tools-0.28.0 vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec.rb
ehbrs-tools-0.27.0 vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec.rb
ehbrs-tools-0.26.0 vendor/ultimate_lyrics/spec/lib/ultimate_lyrics/parser_spec.rb