test/test_helper.rb in troo-0.0.9 vs test/test_helper.rb in troo-0.0.10
- old
+ new
@@ -18,14 +18,21 @@
require_relative './support/vcr_setup.rb'
require_relative '../lib/troo.rb'
require_relative './support/fabrication.rb'
-database = Troo::Configuration.load('test/support/.trooconf', :test).database
-Ohm.connect(db: database)
+Troo::Database
+ .connect(Troo::Configuration
+ .load('config/trooconf.yml', :test))
require 'mocha/setup'
def database_cleanup(delay = 0)
Ohm.redis.flushdb
sleep delay if delay > 0
+end
+
+def mock_trello_response(filename, klass)
+ json = File.read('./test/support/remotes/' + filename)
+ hash = Yajl::Parser.parse(json)
+ klass.new(hash)
end