Fixed defect with using the Rake Task without having Rails installed #28
@ -42,7 +42,10 @@ module Jasmine
|
|||||||
:jasmine_config => @jasmine_config
|
:jasmine_config => @jasmine_config
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
create_rails_compliant_task if defined?(Rails)
|
||||||
|
end
|
||||||
|
private
|
||||||
|
def create_rails_compliant_task
|
||||||
if Rails.version >= "3.1.0"
|
if Rails.version >= "3.1.0"
|
||||||
desc 'Force generate static assets without an MD5 hash, all assets end with -test.<ext>'
|
desc 'Force generate static assets without an MD5 hash, all assets end with -test.<ext>'
|
||||||
task 'assets:precompile:for_testing' => :environment do
|
task 'assets:precompile:for_testing' => :environment do
|
||||||
|
20
spec/lib/jasmine/headless/task_spec.rb
Normal file
20
spec/lib/jasmine/headless/task_spec.rb
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
require 'spec_helper'
|
||||||
|
require 'fakefs/spec_helpers'
|
||||||
|
require 'jasmine/headless/task'
|
||||||
|
|
||||||
|
module Jasmine
|
||||||
|
module Headless
|
||||||
|
class Task
|
||||||
|
def desc(block)
|
||||||
|
end
|
||||||
|
def task(block)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
describe Jasmine::Headless::Task do
|
||||||
|
it 'should not explode when Rails is undefined' do
|
||||||
|
Jasmine::Headless::Task.new('jasmine:headless') do |t|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user