Infrataster
振る舞いテスト
インストール
Gemfile
source 'https://rubygems.org' gem 'infrataster'
install
$ bundle install
initialize
$ rspec --init $ ls .rspec spec/spec_helper.rb
add infrataster settings to spec/spec_helper.rb
require 'infrataster/rspec' Infrataster::Server.define( :app, '192.168.0.0/16', vagrant: true, )
sample test(spec/test_spec.rb)
require 'spec_helper' describe server(:app) do describe http('http://app') do it "responds content including 'Hello Apache'" do expect(response.body).to include('Hello Apache') end it "responds as 'text/html; charset=UTF-8'" do expect(response.headers['content-type']).to eq("text/html; charset=UTF-8") end end end
execute
$ rspec