This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.comment | |
Comments in this file are this color and wrapped in a "div class="comment"". There not expected to be in the output | |
.run | |
.info | |
date command project etc. | |
.summary | |
%h3 | |
Summary | |
%span (click on any summary item to go the step) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Background | |
In for background to work properly | |
As a user | |
I want it to run transactionally and only once when I call an individual scenario | |
Background: | |
Given plop | |
Scenario: Barping | |
When I barp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Background: | |
Given an admin user Philip exists | |
When I login as Philip | |
Then I should be logged in as Philip | |
Scenario Outline: Admin can view resources | |
Given there are 3 <object> | |
When I goto admin_<collection> | |
Then I should see a list of <item> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'cucumber/rake/task' | |
namespace :cucumber do | |
Cucumber::Rake::Task.new(:webrat) do |t| | |
t.fork = true # Explicitly fork for cucumber 0.3.4 and rails | |
t.cucumber_opts = "--format progress" | |
t.step_list = %w{features/support/env.rb features/support/webrat.rb features/step_definitions} | |
t.feature_list = %w{features/webrat} | |
end | |
task :webrat => 'db:test:prepare' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe Customer, "last billing address" do | |
before do | |
@customer = Customer.generate! | |
@customer = Address.new | |
end | |
it "should be settable and gettable" do | |
@customer.last_billing_address = @account_address | |
@customer.last_billing_address.should == @account_address | |
end | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths")) | |
require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "textmate_formatter")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.after_initialize do | |
MVOR::Gateway.use_3ds_test_gateway | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.after_initialize do | |
AppConfig.gateway = ActiveMerchant::Billing::AxiarGateway.new(:login => 'test', :password => 'test', :mode => self.gateway_mode) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/cucumber.yml | |
default: --tags ~@wip | |
new: --tags @wip:2 --wip | |
# see cucumber-rails wiki for interesting ways to use this file to run cucumber how you want (link here) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module UserStepHelper | |
def user_fill_in_login(name, password=nil) | |
login = name =~ /@/ ? name : remove_non_ascii(name)+'@example.com' | |
login.downcase! | |
password ||= name + 'pass' | |
fill_in('login', :with => login) | |
fill_in('password', :with => password) | |
end | |
def user_fill_in_signup(name) |
OlderNewer