Sha256: 13f05c2fd6f533b417b6f7b87638486d68f7a99b598565af6c269337efdd2b06

Contents?: true

Size: 772 Bytes

Versions: 4

Compression:

Stored size: 772 Bytes

Contents

require 'rspec'

Given /^my config file is in "(.*?)"$/ do |config_file_path|
  @config_file_path = config_file_path
end

When /^I run the configure-s3-website command$/ do
  @console_output = capture_stdout {
    config_source = ConfigureS3Website::FileConfigSource.new(@config_file_path)
    ConfigureS3Website::S3Client.configure_website(config_source)
  }
end

Then /^the output should be$/ do |expected_console_output|
  @console_output.should eq(expected_console_output)
end

Then /^the output should include$/ do |expected_console_output|
  @console_output.should include(expected_console_output)
end

module Kernel
  require 'stringio'

  def capture_stdout
    out = StringIO.new
    $stdout = out
    yield
    out.string
  ensure
    $stdout = STDOUT
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
configure-s3-website-1.2.0 features/step_definitions/steps.rb
configure-s3-website-1.1.2 features/step_definitions/steps.rb
configure-s3-website-1.1.1 features/step_definitions/steps.rb
configure-s3-website-1.1.0 features/step_definitions/steps.rb