Skip to content

Instantly share code, notes, and snippets.

default: -r features/support/env.rb -r features/support/plain.rb -r features/step_definitions features/plain
selenium: -r features/support/env.rb -r features/support/enhanced.rb -r features/step_definitions features/enhanced
bmabey@BenzII:~/p/ruby/rspec (master)$ cucumber --version
0.2.3
# run by just specifying the features dir, notice how no files are required
bmabey@BenzII:~/p/ruby/rspec (master)$ cucumber -v features
Ruby files required:
Features:
* features/before_and_after_blocks/before_and_after_blocks.feature
* features/example_groups/example_group_with_should_methods.feature
* features/example_groups/implicit_docstrings.feature
| Religion | Pork | Lamb | Veal |
| Christian | Y | Y | Y |
| Jewish | | Y | Y |
| Muslim | | Y | Y |
| Hindu | Y | Y | |
| Atheist | Y | Y | Y |
Scenario Outline: Religious menus
Given I am "<Religion>"
When I ask to see a menu
Then I should be presented a menu with meats entrees
<Meats>
And I should be presented a menu with hamburger types
<Hamburgers>
Examples:
default: -r features/support/env.rb -r features/step_definitions features/plain
non_txa: -r features/support/non_txa_env.rb -r features/step_definitions features/non_txa
def automated(desc, &blk)
return if ENV['SKIP_AUTOMATED_SPECS']
it desc do
automate do
instance_eval &blk
end
end
end
class StackUnderflowError < RuntimeError
end
class StackOverflowError < RuntimeError
end
class Stack
def initialize
@items = []
#
# .autotest
# Autotest Growl Notifications for Rspec and Test::Unit
#
# Created by Rein Henrichs on 2007-09-12.
# See http://reinh.com/2007/9/12/the-autotest-rosetta-stone
# Copyright 2007 Rein Henrichs.
# http://pastie.caboo.se/96573/download
#
@bmabey
bmabey / env.rb
Created June 4, 2009 01:09
how to get spork working for cucumber in a rails app
require 'rubygems'
require 'spork'
Spork.prefork do
# Sets up the Rails environment for Cucumber
ENV["RAILS_ENV"] ||= "cucumber"
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
require 'webrat'
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".