Sha256: c8514a2594f4527ef3c8f798d7a47add46de5f01f97c0b62f6bb0b5293cd44fa

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

require File.dirname(__FILE__) + "/../lib/integrity"

begin
  require "test/unit"
  require "redgreen"
  require "context"
  require "storyteller"
  require "pending"
  require "matchy"
  require "rr"
  require "mocha"
  require "ruby-debug"
rescue LoadError
  puts "You're missing some gems required to run the tests."
  puts "Please run `rake test:install_dependencies`"
  puts "You'll probably need to run that command as root or with sudo."
  puts 
  puts "Thanks :)"
  puts
  
  exit 1
end

require File.dirname(__FILE__) / "helpers" / "expectations"
require File.dirname(__FILE__) / "helpers" / "fixtures"
require File.dirname(__FILE__) / "helpers" / "acceptance"

module TestHelper
  def setup_and_reset_database!
    DataMapper.setup(:default, "sqlite3::memory:")
    DataMapper.auto_migrate!
  end

  def ignore_logs!
    stub(Integrity).log { nil }
  end
end

class Test::Unit::TestCase
  class << self
    alias_method :specify, :test
  end

  include RR::Adapters::TestUnit
  include Integrity
  include TestHelper
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
foca-integrity-0.1.6 test/helpers.rb