Skip to content

Instantly share code, notes, and snippets.

@sivajankan
Created July 16, 2013 18:51
Show Gist options
  • Save sivajankan/6011496 to your computer and use it in GitHub Desktop.
Save sivajankan/6011496 to your computer and use it in GitHub Desktop.
sample spec_helper.rb
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