Sha256: d9567f12a6f0289286a8e3ec9a6e0a849bfac3b6a8af10b804fd713d58f06197

Contents?: true

Size: 838 Bytes

Versions: 30

Compression:

Stored size: 838 Bytes

Contents

require 'open3'
module FaaStRuby
  module Command
    module Function
      require 'faastruby/cli/commands/function/base_command'
      class Test < FunctionBaseCommand
        def initialize(args)
          @args = args
          load_yaml
          @function_name = @yaml_config['name']
          @test_command = @yaml_config['test_command']
        end

        def run(do_not_exit: false)
          unless @test_command
            # puts "[skipped tests] You have no 'test_command' key/value in 'faastruby.yml'. Please consider using rspec!".yellow
            return true
          end
          # puts "[test] Running tests"
          system(@test_command)
        end

        def self.help
          'test'
        end

        def usage
          "\nUsage: faastruby #{self.class.help}"
        end
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
faastruby-0.5.30 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.29 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.28 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.27 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.26 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.25 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.24 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.23 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.22 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.21 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.20 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.19 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.18 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.17 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.16 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.15 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.14 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.13 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.12 lib/faastruby/cli/commands/function/test.rb
faastruby-0.5.11 lib/faastruby/cli/commands/function/test.rb