spec/plugin/assets_preloading_spec.rb in roda-2.18.0 vs spec/plugin/assets_preloading_spec.rb in roda-2.19.0

- old
+ new

@@ -1,7 +1,23 @@ require File.expand_path("spec_helper", File.dirname(File.dirname(__FILE__))) +run_tests = true +begin + begin + require 'tilt/sass' + rescue LoadError + begin + for lib in %w'tilt sass' + require lib + end + rescue LoadError + warn "#{lib} not installed, skipping assets_preloading plugin test" + run_tests = false + end + end +end + describe "assets_preloading plugin" do before do app(:bare) do plugin :assets, { :css => ['app.scss'], @@ -77,6 +93,6 @@ html.scan('as="style"').count.must_equal 1 html = body('/tags-js') html.scan('as="script"').count.must_equal 1 end -end +end if run_tests