From 104335706a7e84e191111a329146ac2862819cf9 Mon Sep 17 00:00:00 2001 From: Dawa Ometto Date: Fri, 26 Feb 2021 11:34:41 +0100 Subject: [PATCH] Faster tests (#1686) --- CONTRIBUTING.md | 2 ++ Gemfile | 3 +-- lib/gollum/app.rb | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ea24afd7..758a0f84 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,6 +62,8 @@ Pull Requests fixing bugs, implementing new features, or updating documentation ``` bundle exec rake test ``` + +To profile slow tests, you can use `bundle exec rake test TESTOPTS="--verbose"`. ### Working with test repositories diff --git a/Gemfile b/Gemfile index 11479047..1d210903 100644 --- a/Gemfile +++ b/Gemfile @@ -6,5 +6,4 @@ end gemspec -gem "rake", '~> 13.0' - +gem 'rake', '~> 13.0' \ No newline at end of file diff --git a/lib/gollum/app.rb b/lib/gollum/app.rb index f6e98a5c..159f2221 100644 --- a/lib/gollum/app.rb +++ b/lib/gollum/app.rb @@ -117,7 +117,7 @@ module Precious @js = settings.wiki_options[:js] @mathjax_config = settings.wiki_options[:mathjax_config] - @use_static_assets = settings.wiki_options.fetch(:static, settings.environment == :production || settings.environment == :staging) + @use_static_assets = settings.wiki_options.fetch(:static, settings.environment != :development) @static_assets_path = settings.wiki_options.fetch(:static_assets_path, ::File.join(File.dirname(__FILE__), 'public/assets')) @mathjax_path = ::File.join(File.dirname(__FILE__), 'public/gollum/javascript/MathJax')