made the tests a bit more robust, but they may now be more DANGEROUS!

This commit is contained in:
Zachary Spencer 2011-06-28 16:49:31 +08:00
parent 953e4ec5b9
commit 3b214f913f

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