Fixed defect with using the Rake Task without having Rails installed #28

Merged
zspencer merged 4 commits from master into master 2011-06-28 14:21:22 +00:00
Showing only changes of commit 3b214f913f - Show all commits

View File

@ -14,6 +14,16 @@ module Jasmine
end
describe Jasmine::Headless::Task do
it 'should not explode when Rails is undefined' do
Object.send(:remove_const, :Rails) if defined?(Rails)
Jasmine::Headless::Task.new('jasmine:headless') do |t|
end
end
it 'should be OK if rails is defined' do
module Rails
def self.version
return "0"
end
end
Jasmine::Headless::Task.new('jasmine:headless') do |t|
end
end