Sha256: 9c2630b9152a7b9641b78c8f352a6d4ab8ea3bd79868117eb79b0913ee1a5d91

Contents?: true

Size: 1.12 KB

Versions: 4

Compression:

Stored size: 1.12 KB

Contents

Given /^the config file "(.+?)"$/ do |path, content|
  Fast.file.write path, content
end

When /^I start the runner$/ do 
  @arguments ||= []
  Runner.run(
    stdout: fake_stdout, 
    config_file: 'config/main.yaml', 
    log_file: 'log/main.log',
    arguments: @arguments
  )
end

Then /^I should have '(.+?)' with value (\d+) in Configuration$/ do |key, value|
  Configuration.send(key.to_sym).should == value.to_i
end

When /^I info "(.+?)" in the Log$/ do |text|
  Log.info text
end

Then /^I should see "(.+?)" in blue in command line$/ do |text|
  fake_stdout.last.should == Term::ANSIColor.blue(text)
end

And /^I should see "(.+?)" in the "(.+?)" file$/ do |text, file|
  Fast.file.read(file).should include text
end

Given /^the command line arguments$/ do |argument_line|
  @arguments = argument_line.split " "
end

Then /^I should have (\d+) in '(.+?)' in '(.+?)'$/ do |value, subkey, key|
  Configuration.send(key.to_sym).send(subkey.to_sym)
    .should == value.to_i
end

Then /^I should have "(.+?)" in '(.+?)' in '(.+?)'$/ do |value, subkey, key|
  Configuration.send(key.to_sym).send(subkey.to_sym)
    .should == value
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
empezar-0.4.1 features/step_definitions/starting_up_steps.rb
empezar-0.4.0 features/step_definitions/starting_up_steps.rb
empezar-0.3.1 features/step_definitions/starting_up_steps.rb
empezar-0.3.0 features/step_definitions/starting_up_steps.rb