Permalink
Browse files

move v2 spec to v1 and make it work again

  • Loading branch information...
1 parent 6a8f49d commit 30e7a7ef2b542ca5bef686a1e3686f901b0123fa Dennis Schmidt & Ian Baker committed Mar 26, 2013
Showing with 13 additions and 39 deletions.
  1. +0 −3 spec/assets/hello-sinatra/config.ru
  2. +13 −36 spec/features/{v2 → v1}/push_flow_spec.rb
@@ -1,3 +0,0 @@
-require './main'
-
-run Main.new
@@ -1,14 +1,14 @@
require "spec_helper"
require "webmock/rspec"
-if ENV['VMC_V2_TEST_USER'] && ENV['VMC_V2_TEST_PASSWORD'] && ENV['VMC_V2_TEST_TARGET']
- describe 'A new user tries to use VMC against v2', :ruby19 => true do
+if ENV['VMC_TEST_USER'] && ENV['VMC_TEST_PASSWORD'] && ENV['VMC_TEST_TARGET']
+ describe 'A new user tries to use VMC against v1', :ruby19 => true do
include ConsoleAppSpeckerMatchers
include VMC::Interactive
- let(:target) { ENV['VMC_V2_TEST_TARGET'] }
- let(:username) { ENV['VMC_V2_TEST_USER'] }
- let(:password) { ENV['VMC_V2_TEST_PASSWORD'] }
+ let(:target) { ENV['VMC_TEST_TARGET'] }
+ let(:username) { ENV['VMC_TEST_USER'] }
+ let(:password) { ENV['VMC_TEST_PASSWORD'] }
let(:app) do
fuzz = TRAVIS_BUILD_ID.to_s + Time.new.to_f.to_s.gsub(".", "_")
@@ -41,22 +41,6 @@
runner.send_keys password
expect(runner).to say "Authenticating... OK"
-
- expect(runner).to say(
- "Organization>" => proc {
- runner.send_keys "1"
- expect(runner).to say /Switching to organization .*\.\.\. OK/
- },
- "Switching to organization" => proc {}
- )
-
- expect(runner).to say(
- "Space>" => proc {
- runner.send_keys "1"
- expect(runner).to say /Switching to space .*\.\.\. OK/
- },
- "Switching to space" => proc {}
- )
end
run("#{vmc_bin} app #{app}") do |runner|
@@ -71,32 +55,25 @@
expect(runner).to say "Instances> 1"
runner.send_keys ""
- expect(runner).to say "Custom startup command> "
- runner.send_keys "bundle exec ruby main.rb -p $PORT"
+ expect(runner).to say "Framework> sinatra"
+ runner.send_keys ""
+
+ expect(runner).to say "Runtime>"
+ runner.send_keys "1"
expect(runner).to say "Memory Limit>"
runner.send_keys "64M"
expect(runner).to say "Creating #{app}... OK"
- expect(runner).to say "Subdomain> #{app}"
- runner.send_keys ""
-
- expect(runner).to say "1:"
- expect(runner).to say "Domain>"
+ expect(runner).to say "Domain> #{app}"
runner.send_keys "1"
- expect(runner).to say(/Creating route #{app}\..*\.\.\. OK/)
- expect(runner).to say(/Binding #{app}\..* to #{app}\.\.\. OK/)
+ expect(runner).to say "Updating #{app}... OK"
expect(runner).to say "Create services for application?> n"
runner.send_keys ""
- # skip this
- if runner.expect "Bind other services to application?> n", 1
- runner.send_keys ""
- end
-
expect(runner).to say "Save configuration?> n"
runner.send_keys ""
@@ -117,5 +94,5 @@
end
end
else
- $stderr.puts 'Skipping v2 integration specs; please provide $VMC_V2_TEST_TARGET, $VMC_V2_TEST_USER, and $VMC_V2_TEST_PASSWORD'
+ $stderr.puts 'Skipping v1 integration specs; please provide $VMC_TEST_TARGET, $VMC_TEST_USER, and $VMC_TEST_PASSWORD'
end

0 comments on commit 30e7a7e

Please sign in to comment.