Sha256: 5d71b09e275b95cb58cbe48be7f16825b7c78722dc25765a4f7629dbd1da7e70
Contents?: true
Size: 992 Bytes
Versions: 1
Compression:
Stored size: 992 Bytes
Contents
require 'rubygems' gem 'rspec' require 'spec' current_path = File.expand_path(File.dirname(__FILE__)) require "#{current_path}/../lib/ginatra" gem 'webrat', '>=0.4.4' begin # When using webrat 0.6.0, there is no webrat/sinatra.rb file. # Looking at the gem's code, it looks like it autoloads the sinatra adapter at webrat/adapters/sinatra.rb. # So requiring just 'webrat' will also load the sinatra adapater, which is done in the rescue clause. require 'webrat/sinatra' rescue LoadError STDERR.puts "WARNING: could not load webrat/sinatra: #{__FILE__}:#{__LINE__}" require 'webrat' end gem 'rack-test', '>=0.3.0' require 'rack/test' Webrat.configure do |config| config.mode = :sinatra end Ginatra::App.set :environment, :test Ginatra::Config[:git_dirs] = ["#{current_path}/../repos/*"] Spec::Runner.configure do |config| def app Ginatra::App end config.include(Rack::Test::Methods) config.include(Webrat::Methods) config.include(Webrat::Matchers) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ginatra-2.2.0 | spec/spec_helper.rb |