Skip to content

Instantly share code, notes, and snippets.

@tochman
Last active January 17, 2018 17:01
Show Gist options
  • Save tochman/9d31caf23e6692e469f4367d4b712f45 to your computer and use it in GitHub Desktop.
Save tochman/9d31caf23e6692e469f4367d4b712f45 to your computer and use it in GitHub Desktop.
Rspec settings for use with Middleman (acceptance tests)
require 'rspec'
require 'capybara/rspec'
require 'middleman-core'
require 'middleman-core/rack'
require 'middleman-livereload'
require 'middleman-deploy'
require 'middleman-sprockets'
middleman_app = ::Middleman::Application.new
Capybara.app = ::Middleman::Rack.new(middleman_app).to_app do
set :root, File.expand_path(File.join(File.dirname(__FILE__), '..'))
set :environment, :development
set :show_exceptions, false
end
@tochman
Copy link
Author

tochman commented Jul 4, 2016

Make sure to have the relevant gems added to your Gemfile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment