Sha256: 231cce3a434625ad80700d7930cd531840a0226f5a01ebd1b867a000c8953223

Contents?: true

Size: 1.1 KB

Versions: 2

Compression:

Stored size: 1.1 KB

Contents

Given /^I start the gritano console but gritano is not installed$/ do
  stdin = double()
  stdin.stub(:read).and_return("Your SSHKEY here...")
  FileUtils.rm_rf('tmp/.gritano')
  @home_dir = 'tmp'
  @repo_dir = 'tmp'
  @console = Gritano::CLI
end

When /^I execute any command$/ do
  @command = "user:list"
end

Then /^I should see the error: "(.*?)"$/ do |error|
  lambda {@console.execute(@command.split(' '), @stdin, @home_dir, @repo_dir)}.should raise_error SystemExit
end

When /^I install it$/ do
  @prepare_output = @console.execute(['setup:prepare'], @stdin, @home_dir, @repo_dir)
  @install_output = @console.execute(['setup:install'], @stdin, @home_dir, @repo_dir)
end

Then /^I should see that gritano was successful (installed|updated)$/ do |opt|
  @prepare_output.should be == "Gritano's configuration has been generated.\nIf you want to customize it, check your '#{File.join(@home_dir, '.gritano')}' directory." if opt == 'installed'
  @install_output.should be == 'gritano has been installed'
end

When /^I update it$/ do
  @install_output = @console.execute(['setup:install'], @stdin, @home_dir, @repo_dir)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gritano-0.6.0 features/step_definitions/install_step.rb
gritano-0.5.4 features/step_definitions/install_step.rb