Created
June 28, 2016 15:18
-
-
Save wojtha/ca2e660c9fb1402974a3c636d3c9192f to your computer and use it in GitHub Desktop.
Experimental assets compilation before running test suite. However it does not give me any boost.
This file contains hidden or 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
| # See https://github.com/teampoltergeist/poltergeist/issues/677#issuecomment-222919584 | |
| # https://dzone.com/articles/precompiling-rails-assets | |
| RSpec.configure do |config| | |
| config.before :all do | |
| ENV['PRECOMPILE_ASSETS'] ||= begin | |
| case self.class.metadata[:type] | |
| when :feature, :view | |
| STDOUT.write "Precompiling assets..." | |
| require 'rake' | |
| Rails.application.load_tasks | |
| Rake::Task['assets:precompile'].invoke | |
| STDOUT.puts " done." | |
| Time.now.to_s | |
| end | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment