Sha256: 3faa08d8b50d68818ba762f1e50e2a3f4c9617fd3c11b135701a2f9218e75016

Contents?: true

Size: 404 Bytes

Versions: 3

Compression:

Stored size: 404 Bytes

Contents

module GlobalMacros
  def load_file(name)
    File.open("#{image_fixture_path}/#{name}")
  end

  def load_files(*names)
    names.map { |name| load_file(name) }
  end

  def image_fixture_path
    'spec/support/fixtures/images'
  end

  def file_count(path)
    Dir.entries(path).reject { |f| f =~ /\.\.$|\.$|\.gitkeep/ }.size
  end

  def process_latest_sidekiq_job
    Sidekiq::Job.drain_all
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
carrierwave_backgrounder-1.0.2 spec/support/global_macros.rb
carrierwave_backgrounder-1.0.1 spec/support/global_macros.rb
carrierwave_backgrounder-1.0.0 spec/support/global_macros.rb