diff --git a/CHANGELOG.md b/CHANGELOG.md index f959ad0..1c040f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## 0.2.0 -* Add a Rake task +* Add a Rake task and a default task for Rails * Global runner configuration via ~/.jasmine-headless-webkit * Custom Jasmine reporter for better user feedback * Specify the specs to be run, instead of always running them all diff --git a/lib/jasmine-headless-webkit.rb b/lib/jasmine-headless-webkit.rb index 65e2ea8..1813185 100644 --- a/lib/jasmine-headless-webkit.rb +++ b/lib/jasmine-headless-webkit.rb @@ -5,3 +5,5 @@ module Jasmine end end +require 'jasmine/headless/railtie' if defined?(Rails) + diff --git a/lib/jasmine/headless/railtie.rb b/lib/jasmine/headless/railtie.rb new file mode 100644 index 0000000..02441c4 --- /dev/null +++ b/lib/jasmine/headless/railtie.rb @@ -0,0 +1,14 @@ +require 'jasmine/headless/task' + +module Jasmine + module Headless + class Railtie < Rails::Railtie + rake_tasks do + Jasmine::Headless::Task.new do |t| + t.colors = true + end + end + end + end +end +