Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Require rubygems in tests

  • Loading branch information...
commit ade7c10532dd92cad9639d12afe5d270ee5a8ae3 1 parent 6e60639
@sr sr authored
Showing with 25 additions and 27 deletions.
  1. +21 −27 test/helpers.rb
  2. +4 −0 test/helpers/acceptance.rb
View
48 test/helpers.rb
@@ -1,27 +1,24 @@
$:.unshift File.dirname(__FILE__) + "/../lib", File.dirname(__FILE__)
-%w(test/unit
-context
-pending
-matchy
-storyteller
-webrat/sinatra
-rr
-mocha
-dm-sweatshop).each { |dependency|
- begin
- require dependency
- rescue LoadError => e
- puts "You're missing some gems required to run the tests."
- puts "Please run `rake test:setup`"
- puts "NOTE: You'll probably need to run that command as root or with sudo."
-
- puts "Thanks :)"
- puts
-
- raise
- end
-}
+require "rubygems"
+
+require "test/unit"
+require "rr"
+require "mocha"
+require "dm-sweatshop"
+require "webrat/sinatra"
+
+gem "jeremymcanally-context"
+gem "jeremymcanally-matchy"
+gem "jeremymcanally-pending"
+require "context"
+require "matchy"
+require "pending"
+
+require "integrity"
+require "integrity/notifier/test/fixtures"
+
+require "helpers/expectations"
begin
require "ruby-debug"
@@ -29,10 +26,6 @@
rescue LoadError
end
-require "integrity"
-require "helpers/expectations"
-require "integrity/notifier/test/fixtures"
-
module TestHelper
def ignore_logs!
Integrity.config[:log] = "/tmp/integrity.test.log"
@@ -65,10 +58,11 @@ class << self
before(:all) do
DataMapper.setup(:default, "sqlite3::memory:")
+
+ require "integrity/migrations"
end
before(:each) do
- require "integrity/migrations"
[Project, Build, Commit, Notifier].each(&:auto_migrate_down!)
capture_stdout { Integrity.migrate_db }
View
4 test/helpers/acceptance.rb
@@ -1,4 +1,8 @@
require File.dirname(__FILE__) + "/../helpers"
+
+gem "foca-storyteller"
+require "storyteller"
+
require "helpers/acceptance/git_helper"
module AcceptanceHelper
Please sign in to comment.
Something went wrong with that request. Please try again.