From 3b214f913f842ac89513214a4fbd363402e1dc9d Mon Sep 17 00:00:00 2001 From: Zachary Spencer Date: Tue, 28 Jun 2011 16:49:31 +0800 Subject: [PATCH] made the tests a bit more robust, but they may now be more DANGEROUS! --- spec/lib/jasmine/headless/task_spec.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spec/lib/jasmine/headless/task_spec.rb b/spec/lib/jasmine/headless/task_spec.rb index 69847fe..e31a8dd 100644 --- a/spec/lib/jasmine/headless/task_spec.rb +++ b/spec/lib/jasmine/headless/task_spec.rb @@ -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