25. Infrastater Spec ファイル
サンプル App のテスト
25
require 'spec_helper'
describe server(:vagrant_host) do
describe http('http://<vagrant_host>:8080/ruby-sample') do
it "responds content including 'Hello, world'" do
expect(response.body).to include('Hello, world')
end
end
end
tests/spec/raspaas_app_spec.rb
26. Infrastater Spec ファイル
オ`トスケ`リングのテスト
26
require 'spec_helper'
seen = []
describe server(:vagrant_host) do
3.times do
describe http('http://<vagrant_host>:8080/ruby-sample') do
it "responds content including 'Hello, world' from unseen container" do
see = ""
if response.body =~ /Hello, world from (w+)/
see = $1
end
expect(seen).not_to include(see)
seen << see
end
end
end
end
tests/spec/raspaas_auto_scale_spec.rb