Sha256: 3dfbe98981561a62936cbbc8fa36151afb1564ee722d40eb69d7cf0e6c95857d

Contents?: true

Size: 556 Bytes

Versions: 6

Compression:

Stored size: 556 Bytes

Contents

require "minitest/autorun"
require "mocha/mini_test"
require "grub"

module TestHelpers

  def gemfile_path
    File.join(File.dirname(__FILE__), "fixtures", "Gemfile")
  end

  def grubbed_gemfile_path
    File.join(File.dirname(__FILE__), "fixtures", "Gemfile_grubbed")
  end

  def with_gemfile(content)
    file = Tempfile.new('gemfile')
    file.write(content)
    file.close
    yield(file.path)
    file.unlink
  end

  def unindent(str)
    str.gsub(/^#{str.scan(/^[ ]+(?=\S)/).min}/, "")
  end

end

class Minitest::Test
  include TestHelpers
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
grub-0.0.8 test/test_helper.rb
grub-0.0.7 test/test_helper.rb
grub-0.0.6 test/test_helper.rb
grub-0.0.5 test/test_helper.rb
grub-0.0.4 test/test_helper.rb
grub-0.0.3 test/test_helper.rb