Skip to content

Instantly share code, notes, and snippets.

  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kumaresan-rails/23374996f2fe3dcddaa80be59635cdf2 to your computer and use it in GitHub Desktop.
Capybara, Rspec, Rails assets pipeline
# environments/capybara.rb
Dummy::Application.configure do
config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600"
config.assets.compress = true
config.assets.compile = false
config.assets.precompile += %w(email.css)
config.assets.digest = true
config.assets.prefix = "/capybara_test_assets"
# spec/request_helper.rb
ENV["RAILS_ENV"] = 'capybara'
RSpec.configure do |config|
config.before(:suite) do
%x[bundle exec rake assets:precompile]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment