Created
July 16, 2013 18:51
-
-
Save sivajankan/6011496 to your computer and use it in GitHub Desktop.
sample spec_helper.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'bundler/setup' | |
require "rspec" | |
require "capybara/rspec" | |
require "capybara/dsl" | |
require "debugger" | |
require "selenium/webdriver" | |
spec_dir = File.dirname(__FILE__) | |
$LOAD_PATH.unshift(spec_dir) | |
# Require all ruby files in the 'support' folder | |
###UNCOMMENT THIS IF YOU ARE USING FILES FROM spec/support folder | |
#Dir[File.join(spec_dir, "support/**/*.rb")].each {|f| require f} | |
# RSpec config here | |
RSpec.configure do |config| | |
# Capybara config here | |
Capybara.configure do |capybara| | |
# Don't run a rack app | |
capybara.run_server = false | |
end | |
# Don't forget to tell to RSpec to include Capybara :) | |
config.include Capybara::DSL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment