Skip to content

Instantly share code, notes, and snippets.

@mlafeldt
Created September 6, 2013 11:42
Show Gist options
  • Save mlafeldt/6462697 to your computer and use it in GitHub Desktop.
Save mlafeldt/6462697 to your computer and use it in GitHub Desktop.
Provision a VM with Vagrant that can run the Cucumber scenarios in the current folder
# vi: set ft=ruby :
# Install Cucumber and dependencies, and run scenarios.
$script = <<SCRIPT
set -e -x
test -f /var/lib/apt/periodic/update-success-stamp || sudo apt-get update -y
sudo apt-get install -y update-notifier-common ruby rubygems ruby-bundler git
bundle install --gemfile=/vagrant/Gemfile
cd /vagrant
bundle exec rake features
SCRIPT
Vagrant::Config.run do |config|
config.vm.box = 'jimdo-ubuntu-12.10'
config.vm.box_url = 'https://jimdo-vagrant-boxes.s3.amazonaws.com/jimdo-ubuntu-12.10.box'
config.vm.host_name = 'cucumber-ubuntu'
config.vm.provision :shell, :inline => $script
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment