lib_path = File.join(File.dirname(__FILE__), 'lib') $:.unshift(lib_path) unless $:.include?(lib_path) require 'rake/testtask' task :test do |t| $: << File.expand_path('test/') Dir.glob('./test/**/*_test.rb').each { |file| require file } end desc 'Start a dummy (test) Rails app server' task :dummy_rails do require 'rack' require 'term/ansicolor' port = ENV['PORT'] || 9292 puts %Q(Starting on #{Term::ANSIColor.cyan "http://localhost:#{port}"}) Rack::Server.start( config: 'test/dummy_rails/config.ru', Port: port) end task default: :test