Permalink
Browse files

Bad filepath in simple_config_file caused breakage. Sorry

  • Loading branch information...
1 parent 07b6054 commit 40569149f8e239d0cc0fb831548f0ff0a286e285 pivotal committed Jan 28, 2010
View
6 generators/jasmine/templates/spec/javascripts/support/jasmine_config.rb
@@ -2,13 +2,15 @@
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.
View
2 jasmine.gemspec
@@ -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}
View
4 lib/jasmine/config.rb
@@ -116,7 +116,7 @@ def project_root
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 @@ def stylesheets
end
end
-end
+end
View
11 spec/config_spec.rb
@@ -24,7 +24,7 @@
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 @@
@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 @@
@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 @@
}
end
-end
+end

0 comments on commit 4056914

Please sign in to comment.