rearrange the furniture on the Rake task test a little bit
This commit is contained in:
parent
96e071aa37
commit
343fd6f84b
@ -5,26 +5,35 @@ require 'jasmine/headless/task'
|
|||||||
module Jasmine
|
module Jasmine
|
||||||
module Headless
|
module Headless
|
||||||
class Task
|
class Task
|
||||||
def desc(block)
|
def desc(block); end
|
||||||
end
|
def task(block); end
|
||||||
def task(block)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe Jasmine::Headless::Task do
|
describe Jasmine::Headless::Task do
|
||||||
it 'should not explode when Rails is undefined' do
|
after do
|
||||||
Object.send(:remove_const, :Rails) if defined?(Rails)
|
Object.send(:remove_const, :Rails) if defined?(Rails)
|
||||||
Jasmine::Headless::Task.new('jasmine:headless') do |t|
|
end
|
||||||
|
|
||||||
|
context 'without Rails' do
|
||||||
|
it 'should not explode when Rails is undefined' do
|
||||||
|
Jasmine::Headless::Task.new('jasmine:headless')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
it 'should be OK if rails is defined' do
|
|
||||||
module Rails
|
context 'with Rails' do
|
||||||
def self.version
|
before do
|
||||||
return "0"
|
module Rails
|
||||||
|
def self.version
|
||||||
|
return "0"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Jasmine::Headless::Task.new('jasmine:headless') do |t|
|
|
||||||
|
it 'should be OK if rails is defined' do
|
||||||
|
Jasmine::Headless::Task.new('jasmine:headless')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user