Sha256: 83f5f1f643ef5b25331cfc7dcb4d2adf5949540f5cd5d537e67e27a5a651ba0c

Contents?: true

Size: 584 Bytes

Versions: 6

Compression:

Stored size: 584 Bytes

Contents

# encoding: UTF-8
require 'benchmark'
require 'rubygems'
require 'bundler/setup'

require 'grim'

module FileHelpers
  def dimensions_for_path(path)
    width, height = `identify -format '%wx%h' #{path}`.strip.split('x').map(&:to_f)
  end

  def fixture_path(name)
    path = File.expand_path("./spec/fixtures/")
    File.join(path, name)
  end

  def tmp_dir
    path = File.expand_path("./tmp")
    Dir.mkdir(path) unless File.directory?(path)
    path
  end

  def tmp_path(name)
    File.join(tmp_dir, name)
  end
end

RSpec.configure do |config|
  config.include(FileHelpers)
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
grim-1.1.0 spec/spec_helper.rb
grim-1.0.0 spec/spec_helper.rb
grim-0.3.0 spec/spec_helper.rb
grim-0.2.4 spec/spec_helper.rb
grim-0.2.3 spec/spec_helper.rb
grim-0.2.2 spec/spec_helper.rb