Skip to content

Commit

Permalink
use Jasmine::Config 'spec_dir' property to get full paths to spec files
Browse files Browse the repository at this point in the history
  • Loading branch information
mag committed Sep 3, 2010
1 parent b289ca8 commit 4988b6e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/jazz_money/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ class Runner

def self.from_jasmine_config
jasmine_config = Jasmine::Config.new

# jasmine gives us spec files relative to spec/javascripts, but we need them relative to the project root
spec_files_relative_to_project_root = jasmine_config.spec_files.map {|path| "spec/javascripts/#{path}"}
self.new(jasmine_config.src_files, spec_files_relative_to_project_root)
spec_files = jasmine_config.spec_files.map {|path| File.join(jasmine_config.spec_dir, path)}
self.new(jasmine_config.src_files, spec_files)
end

def initialize(js_includes, jasmine_spec_files)
Expand Down

0 comments on commit 4988b6e

Please sign in to comment.