Sha256: 2da3865ba2d60f5d5132bda9b0420723a4bacc13a2319035502984ad5bcd8fee

Contents?: true

Size: 830 Bytes

Versions: 5

Compression:

Stored size: 830 Bytes

Contents

require 'mork'

RSpec.configure do |config|
  config.filter_run focus: true
  config.run_all_when_everything_filtered = true
  config.expect_with :rspec do |c|
    c.syntax = [:should, :expect]
  end
end

class SampleImager
  attr_reader :info
  
  def initialize(which)
    ya = YAML.load_file("./spec/samples/info.yml")
    @info = ya[which.to_s]
  end
  
  def grid_file
    @info["grid-file"]
  end
  
  def reg_marks
    @info["reg-marks"]
  end
  
  def q_boxes
    @info["q-boxes"]
  end
  
  def barcode_string
    @info["barcode-string"]
  end
  
  def barcode_int
    @info["barcode-int"]
  end
  
  def filename
    @info["filename"]
  end
  
  def width
    @info["width"]
  end
  
  def height
    @info["height"]
  end
  
  def pages
    @info["pages"]
  end
end

def sample_img(which)
  SampleImager.new(which)
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mork-0.6.0 spec/spec_helper.rb
mork-0.5.0 spec/spec_helper.rb
mork-0.4.0 spec/spec_helper.rb
mork-0.3.0 spec/spec_helper.rb
mork-0.2.1 spec/spec_helper.rb