Sha256: 2329ba875d9139c568634de63e30c8b396b5fdb7d303eb21a78171dda8121f06

Contents?: true

Size: 469 Bytes

Versions: 10

Compression:

Stored size: 469 Bytes

Contents

# frozen_string_literal: true

module Spout
  module Commands
    # Runs spout tests.
    class TestRunner
      class << self
        def run
          new.run
        end
      end

      def run
        $LOAD_PATH.unshift File.join(Dir.pwd, "test")
        Dir.glob(test_files, File::FNM_CASEFOLD).each do |test_file|
          require test_file
        end
      end

      def test_files
        File.join(Dir.pwd, "test", "*_test.rb")
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
spout-1.0.0 lib/spout/commands/test_runner.rb
spout-1.0.0.beta3 lib/spout/commands/test_runner.rb
spout-1.0.0.beta2 lib/spout/commands/test_runner.rb
spout-1.0.0.beta1 lib/spout/commands/test_runner.rb
spout-0.14.1 lib/spout/commands/test_runner.rb
spout-0.14.0 lib/spout/commands/test_runner.rb
spout-0.14.0.rc lib/spout/commands/test_runner.rb
spout-0.14.0.beta3 lib/spout/commands/test_runner.rb
spout-0.14.0.beta2 lib/spout/commands/test_runner.rb
spout-0.14.0.beta1 lib/spout/commands/test_runner.rb