Sha256: 965cbdb8fb6a0be312728dd7ba8ce9a760a2c4d1d9f99af6833cc83b98a2088a

Contents?: true

Size: 1.06 KB

Versions: 18

Compression:

Stored size: 1.06 KB

Contents

module Minke
  module Tasks
    class Cucumber < Task

      def run args = nil
      	puts "## Running cucumber with tags #{args}"

        compose_file = @config.compose_file_for(@task_name)
        compose_file = File.expand_path(compose_file)
        compose = @docker_compose_factory.create compose_file unless compose_file == nil

        run_with_block do
          status = false
          begin
            compose.up
            server_address = @service_discovery.build_address(@task_settings.health_check) 
            @health_check.wait_for_HTTPOK(server_address) unless @task_settings.health_check == nil
            
            status = @shell_helper.execute "cucumber --color -f pretty #{get_features args}"
          ensure
            compose.down
            @error_helper.fatal_error("Cucumber steps failed") unless status == true
          end
      	end
      end

      def get_features args
        if args != nil && args[:feature] != nil
      		feature = "--tags #{args[:feature]}"
      	else
      		feature = ""
      	end
      end

    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
minke-1.12.9 lib/minke/tasks/cucumber.rb
minke-1.12.8 lib/minke/tasks/cucumber.rb
minke-1.12.7 lib/minke/tasks/cucumber.rb
minke-1.12.5 lib/minke/tasks/cucumber.rb
minke-1.12.4 lib/minke/tasks/cucumber.rb
minke-1.12.3 lib/minke/tasks/cucumber.rb
minke-1.12.2 lib/minke/tasks/cucumber.rb
minke-1.12.0 lib/minke/tasks/cucumber.rb
minke-1.11.9 lib/minke/tasks/cucumber.rb
minke-1.11.8 lib/minke/tasks/cucumber.rb
minke-1.11.7 lib/minke/tasks/cucumber.rb
minke-1.11.6 lib/minke/tasks/cucumber.rb
minke-1.11.5 lib/minke/tasks/cucumber.rb
minke-1.11.4 lib/minke/tasks/cucumber.rb
minke-1.11.3 lib/minke/tasks/cucumber.rb
minke-1.11.2 lib/minke/tasks/cucumber.rb
minke-1.11.1 lib/minke/tasks/cucumber.rb
minke-1.11.0 lib/minke/tasks/cucumber.rb