Sha256: 0e09e16af65ad9e519931faa85939ed0b9b5355d057bcd10725fef9667a0d829

Contents?: true

Size: 1.13 KB

Versions: 3

Compression:

Stored size: 1.13 KB

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, :reg_marks, :q_boxes, :code_string, :code_int
  
  def initialize(which)
    ya = YAML.load_file("./spec/samples/info.yml")
    @info        = ya[which.to_s]
    @reg_marks   = @info["reg_marks"]
    @q_boxes     = @info["q_boxes"]
    @code_string = @info["code_string"]
    @code_int    = @info["code_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

def some_pdf_content
  {
    code: 2345678,
    choices: [5] * 120,
    header: {
      name:  "Bertini Giuseppe VR123456",
      title: "Esame di Fondamenti Morfologici e Funzionali della Vita - 18 gennaio 2013",
      code:  "119.27",
      signature: "Firma"
    },
    control: {
      string: "Annerisci solo la casella ā€˜Vā€™:",
      labels: ['V', 'F']
    }
  }
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mork-0.0.9 spec/spec_helper.rb
mork-0.0.8 spec/spec_helper.rb
mork-0.0.7 spec/spec_helper.rb