Sha256: 1f5a56bf9e237c569478b1ee57adcef780c9c00b2d28f8dc84426b64b25772d4

Contents?: true

Size: 594 Bytes

Versions: 2

Compression:

Stored size: 594 Bytes

Contents

module Fixtures
  extend self

  def xcdatamodeld
    'spec/resources/Model.xcdatamodeld'
  end

  def expected_dir
    'spec/resources/expected'
  end

  def generated_dir
    'spec/resources/tmp'
  end

  def generated_file_content(name)
    read_file(generated_dir, name)
  end

  def expected_content(name)
    read_file(expected_dir, name)
  end

  def read_file(directory, file)
    File.read(File.join(directory, file))
  end

  def delete_tmp_files(files)
    files.each { |file|
      path = File.join(generated_dir, file)
      File.delete(path) if File.exists?(path)
    }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
moblues-0.1.0 spec/resources/fixtures.rb
moblues-0.0.1 spec/resources/fixtures.rb