Bad filepath in simple_config_file caused breakage. Sorry
This commit is contained in:
parent
07b60547b6
commit
40569149f8
|
@ -2,13 +2,15 @@ require 'jasmine'
|
|||
|
||||
class Jasmine::Config
|
||||
|
||||
# Override these methods if necessary
|
||||
|
||||
# def project_root
|
||||
# Dir.pwd
|
||||
# end
|
||||
|
||||
# Path to your jasmine.yaml
|
||||
# Path to your jasmine.yml
|
||||
# def simple_config_file
|
||||
# File.join(project_root, 'spec/javascripts/support/jasmine.yaml')
|
||||
# File.join(project_root, 'spec/javascripts/support/jasmine.yml')
|
||||
# end
|
||||
|
||||
# Source directory path. Your src_files must be returned relative to this path.
|
||||
|
|
|
@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|||
|
||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||
s.authors = ["Rajan Agaskar", "Christian Williams"]
|
||||
s.date = %q{2010-01-27}
|
||||
s.date = %q{2010-01-28}
|
||||
s.default_executable = %q{jasmine}
|
||||
s.description = %q{Javascript BDD test framework}
|
||||
s.email = %q{ragaskar@gmail.com}
|
||||
|
|
|
@ -116,7 +116,7 @@ module Jasmine
|
|||
end
|
||||
|
||||
def simple_config_file
|
||||
File.join(project_root, 'spec/javascripts/support/jasmine.yaml')
|
||||
File.join(project_root, 'spec/javascripts/support/jasmine.yml')
|
||||
end
|
||||
|
||||
def src_dir
|
||||
|
@ -160,4 +160,4 @@ module Jasmine
|
|||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -24,7 +24,7 @@ describe Jasmine::Config do
|
|||
end
|
||||
|
||||
it "if jasmine.yml is empty" do
|
||||
@config.stub!(:simple_config_file).and_return(File.join(@template_dir, 'spec/javascripts/support/jasmine.yaml'))
|
||||
@config.stub!(:simple_config_file).and_return(File.join(@template_dir, 'spec/javascripts/support/jasmine.yml'))
|
||||
YAML.stub!(:load).and_return(false)
|
||||
@config.src_files.should == []
|
||||
@config.stylesheets.should == []
|
||||
|
@ -54,7 +54,7 @@ describe Jasmine::Config do
|
|||
@config.stylesheets.should == ['foo.css', 'bar.css']
|
||||
end
|
||||
|
||||
it "using rails jasmine.yaml" do
|
||||
it "using rails jasmine.yml" do
|
||||
original_glob = Dir.method(:glob)
|
||||
Dir.stub!(:glob).and_return do |glob_string|
|
||||
if glob_string =~ /public/
|
||||
|
@ -97,6 +97,11 @@ describe Jasmine::Config do
|
|||
@config.src_dir.should == 'some_project_root'
|
||||
end
|
||||
|
||||
it "should use correct default yaml config" do
|
||||
@config.stub!(:project_root).and_return('some_project_root')
|
||||
@config.simple_config_file.should == (File.join('some_project_root', 'spec/javascripts/support/jasmine.yml'))
|
||||
end
|
||||
|
||||
|
||||
it "should provide dir mappings" do
|
||||
@config.mappings.should == {
|
||||
|
@ -105,4 +110,4 @@ describe Jasmine::Config do
|
|||
}
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue