Sha256: 6adc6a2a04c6467651890dc4dd064feee83f4703c730a18b9d6c854ef9479990

Contents?: true

Size: 584 Bytes

Versions: 11

Compression:

Stored size: 584 Bytes

Contents

require "test/unit"
require "mocha"
require_relative "../lib/browser_shooter"

module TestHelper
  FIXTURES = File.expand_path( "#{File.dirname(__FILE__)}/fixtures" )

  def read_fixture( fixture_name )
    File.read( "#{FIXTURES}/#{fixture_name}" )
  end

  def in_tmpdir
    path = File.expand_path "#{Dir.tmpdir}/#{Time.now.to_i}_#{rand(1000)}/"
    FileUtils.mkdir_p( path )

    yield( path )

  ensure
    FileUtils.rm_rf( path ) if File.exists?( path )
  end
end

class Test::Unit::TestCase
  include TestHelper

  def setup
    BrowserShooter::Logger.stubs( :log )
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
browser_shooter-0.3.13 test/test_helper.rb
browser_shooter-0.3.11 test/test_helper.rb
browser_shooter-0.3.9 test/test_helper.rb
browser_shooter-0.3.7 test/test_helper.rb
browser_shooter-0.3.5 test/test_helper.rb
browser_shooter-0.3.3 test/test_helper.rb
browser_shooter-0.3.1 test/test_helper.rb
browser_shooter-0.2.3 test/test_helper.rb
browser_shooter-0.1.3 test/test_helper.rb
browser_shooter-0.1.1 test/test_helper.rb
browser_shooter-0.0.5 test/test_helper.rb