forked from jfirebaugh/konacha
/
spec_helper.rb
34 lines (28 loc) · 941 Bytes
/
spec_helper.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# In a real-world app, `rake konacha:serve` and `rake konacha:run` will use
# the development environment, so we test with the development defaults.
# In particular, it is important to test with `config.assets.debug = true`.
ENV["RAILS_ENV"] = "development"
require File.expand_path("../dummy/config/environment.rb", __FILE__)
require "rspec/rails"
require "rspec/autorun"
# Preload to avoid occasional tilt warnings about thread safety
require "coffee_script"
require "ejs"
require "capybara/rails"
require "capybara/firebug"
Capybara.configure do |config|
config.default_selector = :css
config.default_driver = :selenium_with_firebug
config.app = Konacha.application
end
module Konacha
module RequestSpec
def app
# Override the RSpec default of `Rails.application`.
Konacha.application
end
end
end
RSpec.configure do |config|
config.include Konacha::RequestSpec, :type => :request
end