lib/simba/base_app/test/test_helper.rb in simba-0.0.3 vs lib/simba/base_app/test/test_helper.rb in simba-0.0.4
- old
+ new
@@ -1,20 +1,20 @@
ENV['RACK_ENV'] ||= "test"
require_relative "../config/boot.rb"
+
# factory_girl
dir = File.expand_path File.dirname(__FILE__)
Dir.glob "#{dir}/factory/**/*_factory.rb" do |f|
require f
end
-# minitest
+
require "minitest/autorun"
-# rack test
require "rack/test"
-# database_clean
DatabaseCleaner.strategy = :truncation
class TestCase < MiniTest::Unit::TestCase
+ include FactoryGirl::Syntax::Methods
def initialize *xs
super
DatabaseCleaner.clean
end
end
@@ -22,6 +22,6 @@
class FunctionalTestCase < TestCase
include Rack::Test::Methods
def app
Sinatra::Application
end
-end
\ No newline at end of file
+end