Sha256: 2588564972a9c47898602d7c50bb3689d762c5b8580252798397cb006ba71419
Contents?: true
Size: 1.35 KB
Versions: 17
Compression:
Stored size: 1.35 KB
Contents
require "rubygems" require "spec" require "spec/autorun" require "rack/test" ARGV.push("-b") dir = File.dirname(__FILE__) LIBRARY_ROOT_DIR = File.expand_path("#{dir}/../..") $LOAD_PATH.unshift File.expand_path("#{LIBRARY_ROOT_DIR}/lib") require "screw_unit" require "nokogiri" require "guid" require "#{LIBRARY_ROOT_DIR}/vendor/js-test-core/spec/spec_helpers/be_http" require "#{LIBRARY_ROOT_DIR}/vendor/js-test-core/spec/spec_helpers/show_test_exceptions" Spec::Runner.configure do |config| config.mock_with :rr end Sinatra::Application.use ShowTestExceptions Sinatra::Application.set :raise_errors, true Sinatra::Application.set :show_exceptions, false JsTestCore::App.set :raise_errors, true JsTestCore::App.set :show_exceptions, false Sinatra::Application.use(ScrewUnit::App) class Spec::ExampleGroup include Rack::Test::Methods include BeHttp attr_reader :spec_root_path, :public_path, :server, :connection before(:all) do dir = File.dirname(__FILE__) @spec_root_path = File.expand_path("#{dir}/../example_specs") @public_path = File.expand_path("#{dir}/../example_public") end before(:each) do JsTestCore::Configuration.instance.spec_root_path = spec_root_path JsTestCore::Configuration.instance.public_path = public_path end def app Sinatra::Application end def core_path JsTestCore::Server.core_path end end
Version data entries
17 entries across 17 versions & 4 rubygems