This repository has been archived by the owner on Dec 5, 2023. It is now read-only.
forked from johnbintz/jasmine-headless-webkit
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request johnbintz#28 from zspencer/master
Fixed defect with using the Rake Task without having Rails installed
- Loading branch information
Showing
2 changed files
with
41 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
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 | ||
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 | ||
end |