%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/opti/workflow/node_modules/aws-sdk/tasks/lib/
Upload File :
Create Path :
Current File : /home/opti/workflow/node_modules/aws-sdk/tasks/lib/cucumber_generator.rb

# Generates features/service/* files
class CucumberGenerator
  def initialize(klass, service, api)
    @klass = klass
    @service = service
    @api = api
  end

  def features_file
    <<-eof
# language: en
@#{@service}
Feature: #{@api['service_full_name']}

  I want to use #{@api['service_full_name']}

  Scenario: Feature
    Given I create something with the service
    Then the request should be successful
    And I delete the thing I created

  Scenario: Error handling
    Given I do something with the service
    Then the error code should be "ValidationError"
    eof
  end

  def step_definitions_file
    <<-eof
module.exports = function() {
  this.Before("@#{@service}", function (callback) {
    this.service = new this.AWS.#{@klass}();
    callback();
  });

  // Add step definitions
};
    eof
  end
end

Zerion Mini Shell 1.0