yet more changes, getting really close
This commit is contained in:
parent
fde8bc3b7b
commit
9b5729b808
@ -3,6 +3,7 @@
|
||||
# watch('file/path') { `command(s)` }
|
||||
#
|
||||
|
||||
if false
|
||||
guard 'coffeescript', :input => 'vendor/assets/coffeescripts', :output => 'vendor/assets/javascripts'
|
||||
|
||||
guard 'shell' do
|
||||
@ -21,6 +22,7 @@ guard 'rspec', :version => 2, :all_on_start => false do
|
||||
watch(%r{^bin/(.+)}) { |m| "spec/bin/#{m[1]}_spec.rb" }
|
||||
watch('spec/spec_helper.rb') { "spec" }
|
||||
end
|
||||
end
|
||||
|
||||
guard 'jasmine-headless-webkit', :all_on_start => false do
|
||||
watch(%r{^spec/javascripts/.+_spec\.coffee})
|
||||
|
@ -5,8 +5,6 @@ module Jasmine::Headless
|
||||
require 'coffee-script'
|
||||
require 'rainbow'
|
||||
|
||||
FilesList.reset!
|
||||
|
||||
begin
|
||||
options = Options.from_command_line
|
||||
runner = Runner.new(options)
|
||||
|
@ -61,7 +61,7 @@ module Jasmine::Headless
|
||||
@potential_files_to_filter = []
|
||||
|
||||
self.class.default_files.each do |file|
|
||||
@required_files << RequiredFile.new(*path_searcher.find(file.dup), self)
|
||||
@required_files << RequiredFile.new(*[ path_searcher.find(file.dup), self ].flatten)
|
||||
end
|
||||
|
||||
use_config! if config?
|
||||
@ -205,7 +205,15 @@ module Jasmine::Headless
|
||||
end
|
||||
end
|
||||
|
||||
@required_files.uniq!(&:path)
|
||||
filtered_required_files = []
|
||||
|
||||
@required_files.each do |file|
|
||||
if !filtered_required_files.any? { |other_file| other_file == file }
|
||||
filtered_required_files << file
|
||||
end
|
||||
end
|
||||
|
||||
@required_files = filtered_required_files
|
||||
end
|
||||
|
||||
def config?
|
||||
|
@ -62,7 +62,7 @@ module Jasmine::Headless
|
||||
|
||||
files.collect do |file|
|
||||
if result = path_searcher.find(file)
|
||||
self.class.new(*result, self)
|
||||
self.class.new(*[ result, self ].flatten)
|
||||
else
|
||||
raise Sprockets::FileNotFound.new("Could not find #{file}, referenced from #{path}:#{line}")
|
||||
end
|
||||
|
@ -69,6 +69,7 @@ module Jasmine
|
||||
|
||||
def run
|
||||
Jasmine::Headless::CacheableAction.enabled = @options[:enable_cache]
|
||||
FilesList.reset!
|
||||
|
||||
files_list = Jasmine::Headless::FilesList.new(
|
||||
:config => jasmine_config,
|
||||
|
@ -73,7 +73,11 @@ if window.JHW
|
||||
|
||||
pauseAndRun = (onComplete) ->
|
||||
JHW.timerPause()
|
||||
if this.env.reporter.reportSpecWaiting
|
||||
this.env.reporter.reportSpecWaiting(this)
|
||||
this._execute ->
|
||||
if this.env.reporter.reportSpecRunning
|
||||
this.env.reporter.reportSpecRunning(this)
|
||||
JHW.timerDone()
|
||||
onComplete()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user