lib/konacha/engine.rb in konacha-2.7.0 vs lib/konacha/engine.rb in konacha-3.0.0

- old
+ new

@@ -18,10 +18,20 @@ run Engine end end end + def self.formatters + if ENV['FORMAT'] + ENV['FORMAT'].split(',').map do |string| + eval(string).new(STDOUT) + end + else + [Konacha::Formatter.new(STDOUT)] + end + end + initializer "konacha.environment" do |app| options = app.config.konacha options.spec_dir ||= "spec/javascripts" options.spec_matcher ||= /_spec\.|_test\./ @@ -29,9 +39,10 @@ options.application ||= self.class.application(app) options.driver ||= :selenium options.stylesheets ||= %w(application) options.verbose ||= false options.runner_port ||= nil + options.formatters ||= self.class.formatters app.config.assets.paths << app.root.join(options.spec_dir).to_s end end end