Sha256: 836959ba48161de0090e1bdc76dea8476b9e1a6fd0756d6919c73e86a6de2e38

Contents?: true

Size: 1.11 KB

Versions: 18

Compression:

Stored size: 1.11 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(File.join("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

18 entries across 18 versions & 1 rubygems

Version Path
gritano-1.0.0 features/step_definitions/install_step.rb
gritano-0.11.2 features/step_definitions/install_step.rb
gritano-0.11.1 features/step_definitions/install_step.rb
gritano-0.11.0 features/step_definitions/install_step.rb
gritano-0.10.3 features/step_definitions/install_step.rb
gritano-0.10.2 features/step_definitions/install_step.rb
gritano-0.10.1 features/step_definitions/install_step.rb
gritano-0.10.0 features/step_definitions/install_step.rb
gritano-0.9.4 features/step_definitions/install_step.rb
gritano-0.9.3 features/step_definitions/install_step.rb
gritano-0.9.2 features/step_definitions/install_step.rb
gritano-0.9.1 features/step_definitions/install_step.rb
gritano-0.9.0 features/step_definitions/install_step.rb
gritano-0.8.1 features/step_definitions/install_step.rb
gritano-0.8.0 features/step_definitions/install_step.rb
gritano-0.7.2 features/step_definitions/install_step.rb
gritano-0.7.1 features/step_definitions/install_step.rb
gritano-0.7.0 features/step_definitions/install_step.rb