look sir, cucumbers
This commit is contained in:
parent
f4cafdc5a7
commit
bfbc9243c3
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,4 +1,6 @@
|
|||||||
.vagrant
|
.vagrant
|
||||||
themes/*
|
themes/*
|
||||||
plugins/*
|
plugins/*
|
||||||
wordpress/*
|
wordpress/*
|
||||||
|
Gemfile.lock
|
||||||
|
|
||||||
|
5
Gemfile
5
Gemfile
@ -1,4 +1,7 @@
|
|||||||
# A sample Gemfile
|
# A sample Gemfile
|
||||||
source "http://rubygems.org"
|
source "http://rubygems.org"
|
||||||
|
|
||||||
gem "vagrant"
|
gem "vagrant", '~> 0.8.0'
|
||||||
|
gem 'cucumber'
|
||||||
|
gem 'capybara-webkit'
|
||||||
|
gem 'rspec'
|
||||||
|
33
Gemfile.lock
33
Gemfile.lock
@ -1,33 +0,0 @@
|
|||||||
GEM
|
|
||||||
remote: http://rubygems.org/
|
|
||||||
specs:
|
|
||||||
abstract (1.0.0)
|
|
||||||
archive-tar-minitar (0.5.2)
|
|
||||||
erubis (2.6.6)
|
|
||||||
abstract (>= 1.0.0)
|
|
||||||
ffi (1.0.9)
|
|
||||||
i18n (0.5.0)
|
|
||||||
json (1.5.1)
|
|
||||||
mario (0.0.6)
|
|
||||||
net-scp (1.0.4)
|
|
||||||
net-ssh (>= 1.99.1)
|
|
||||||
net-ssh (2.1.4)
|
|
||||||
thor (0.14.6)
|
|
||||||
vagrant (0.7.5)
|
|
||||||
archive-tar-minitar (= 0.5.2)
|
|
||||||
erubis (~> 2.6.6)
|
|
||||||
i18n (~> 0.5.0)
|
|
||||||
json (~> 1.5.1)
|
|
||||||
mario (~> 0.0.6)
|
|
||||||
net-scp (~> 1.0.4)
|
|
||||||
net-ssh (~> 2.1.0)
|
|
||||||
thor (~> 0.14.6)
|
|
||||||
virtualbox (~> 0.8.3)
|
|
||||||
virtualbox (0.8.6)
|
|
||||||
ffi (~> 1.0)
|
|
||||||
|
|
||||||
PLATFORMS
|
|
||||||
ruby
|
|
||||||
|
|
||||||
DEPENDENCIES
|
|
||||||
vagrant
|
|
7
features/home_page.feature
Normal file
7
features/home_page.feature
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Feature: Home Page
|
||||||
|
Scenario: Load the home page
|
||||||
|
Given I have a running WordPress site
|
||||||
|
When I visit the home page
|
||||||
|
Then I should not see a WordPress installation page
|
||||||
|
And I should see a WordPress site
|
||||||
|
|
@ -0,0 +1,3 @@
|
|||||||
|
Given /^I have a running WordPress site$/ do
|
||||||
|
ensure_vagrant_running
|
||||||
|
end
|
@ -0,0 +1,3 @@
|
|||||||
|
Then /^I should not see a WordPress installation page$/ do
|
||||||
|
page.should_not have_css('link[href*="install.css"]')
|
||||||
|
end
|
@ -0,0 +1,3 @@
|
|||||||
|
Then /^I should see a WordPress site$/ do
|
||||||
|
page.should have_css('meta[content*="WordPress"]')
|
||||||
|
end
|
3
features/step_definitions/when/i_visit.rb
Normal file
3
features/step_definitions/when/i_visit.rb
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
When /^I visit the home page$/ do
|
||||||
|
visit '/'
|
||||||
|
end
|
19
features/support/env.rb
Normal file
19
features/support/env.rb
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
require 'capybara/cucumber'
|
||||||
|
|
||||||
|
Capybara.app_host = 'http://localhost:8080/'
|
||||||
|
|
||||||
|
require 'capybara-webkit'
|
||||||
|
|
||||||
|
Capybara.default_driver = :webkit
|
||||||
|
|
||||||
|
def ensure_vagrant_running
|
||||||
|
require 'vagrant'
|
||||||
|
|
||||||
|
vm = Vagrant::Environment.new.primary_vm
|
||||||
|
if !vm.created?
|
||||||
|
raise StandardError.new("VM not created! Run `bundle exec vagrant up`.")
|
||||||
|
end
|
||||||
|
|
||||||
|
vm.start
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user