lib/gondola/suiterunner.rb
# Function to run all tests that have been added
#   - opts: hash which can be used to override the
#           configuration from yml files
Function to run all tests that have been added
opts: hash which can be used to override the
configuration from yml files
Function to run all tests that have been added opts : hash which can be used to override the configuration from yml files
def run(opts = {})
      if @tests.empty?
        puts "No tests to run"
      end
      @tests.each do |test|
        if File.directory? test
          Dir.chdir(test) do
            prepend = ""
            if opts[:recursive] == true
              prepend = "**/"
            end
            files = Dir.glob(prepend + "*.html")
            files.concat(Dir.glob(prepend + "*.rb"))
            @error.call "No runnable files in \"#{file}\"" if files.empty? and !@error.nil?
            files.each do |file|
              converter,global,browsers = aggregate_data(file, opts)
              run_test(converter, global, browsers)
            end
          end
        else
          file = File.basename(test)
          Dir.chdir(File.dirname(test)) do
              converter,global,browsers = aggregate_data(file, opts)
              run_test(converter, global, browsers)
          end
        end
      end
      @complete.call @results unless @complete.nil?
    end
def run ( opts = { } ) if @tests . empty? puts "No tests to run" end @tests . each do | test | if File . directory? test Dir . chdir ( test ) do prepend = "" if opts [ :recursive ] == true prepend = "**/" end files = Dir . glob ( prepend + "*.html" ) files . concat ( Dir . glob ( prepend + "*.rb" ) ) @error . call "No runnable files in \"#{file}\"" if files . empty? and ! @error . nil? files . each do | file | converter , global , browsers = aggregate_data ( file , opts ) run_test ( converter , global , browsers ) end end else file = File . basename ( test ) Dir . chdir ( File . dirname ( test ) ) do converter , global , browsers = aggregate_data ( file , opts ) run_test ( converter , global , browsers ) end end end @complete . call @results unless @complete . nil? end
Function to run all tests that have been added
 opts: hash which can be used to override the
configuration from yml files
Function to run all tests that have been added opts : hash which can be used to override the configuration from yml files
# Cannot run tests if there are none # Iterate over all tests and dispatch each to Sauce Labs # Run the supplied completion block
opts
<not_specific>