features/step_definitions/ci_steps.rb in lobot-0.10.1 vs features/step_definitions/ci_steps.rb in lobot-0.10.2

- old
+ new

@@ -35,12 +35,12 @@ system("cd testapp && gem install bundler") system!("cd testapp && bundle install") system!('cd testapp && bundle exec gem list | grep lobot') end -When /^I run the Lobot generator$/ do - system!('cd testapp && rails generate lobot:install') +When /^I run the Lobot generator for "([^"]*)"$/ do |build_server_name| + system!("cd testapp && rails generate lobot:install #{build_server_name}") system!('ls testapp | grep -s soloistrc') end When /^I enter my info into the ci\.yml file$/ do hostname = `hostname`.strip @@ -90,11 +90,11 @@ system! "cd testapp && git remote add origin git@github.com:pivotalprivate/ci-smoke.git" system! "cd testapp && git push --force -u origin master" end When /^I start the server$/ do - system! "cd testapp && bundle exec rake ci:server_start" + system! "cd testapp && bundle exec rake ci:create_server" end When /^I bootstrap$/ do system!("cd testapp && bundle install") system! "cd testapp && bundle exec cap ci bootstrap" @@ -111,7 +111,19 @@ end end end Then /^rake reports ci tasks as being available$/ do - `cd testapp && bundle exec rake -T`.should include("ci:start") + `cd testapp && bundle exec rake -T`.should include("ci:start_server") end + +Then /^TeamCity is installed$/ do + ci_conf_location = 'testapp/config/ci.yml' + ci_yml = YAML.load_file(ci_conf_location) + + Timeout::timeout(400) do + until system("wget http://#{ci_yml['server']['elastic_ip']}:8111") + sleep 5 + end + end +end +