cheat sheets.

$ cheat aruba
vim: ft=ruby

Given /^I am using rvm "([^\"]*)"$/ do |rvm_ruby_version|
Given /^I am using( an empty)? rvm gemset "([^\"]*)"$/ do |empty_gemset,
rvm_gemset|
Given /^I am using rvm gemset "([^\"]*)" with Gemfile:$/ do |rvm_gemset,
gemfile|

Given /^a directory named "([^\"]*)"$/ do |dir_name|
Given /^a file named "([^\"]*)" with:$/ do |file_name, file_content|
Given /^an empty file named "([^\"]*)"$/ do |file_name|

When /^I append to "([^\"]*)" with:$/ do |file_name, file_content|
When /^I cd to "([^\"]*)"$/ do |dir|
When /^I run "(.*)"$/ do |cmd|
When /^I successfully run "(.*)"$/ do |cmd|

Then /^I should see "([^\"]*)"$/ do |partial_output|
Then /^I should not see "([^\"]*)"$/ do |partial_output|
Then /^I should see:$/ do |partial_output|
Then /^I should not see:$/ do |partial_output|
Then /^I should see exactly "([^\"]*)"$/ do |exact_output|
Then /^I should see exactly:$/ do |exact_output|

# "I should see matching" allows regex in the partial_output, if
# you don't need regex, use "I should see" instead since
# that way, you don't have to escape regex characters that
# appear naturally in the output
Then /^I should see matching \/([^\/]*)\/$/ do |partial_output|
Then /^I should see matching:$/ do |partial_output|
Then /^the exit status should be (\d+)$/ do |exit_status|
Then /^the exit status should not be (\d+)$/ do |exit_status|

Then /^it should (pass|fail) with:$/ do |pass_fail, partial_output|
Then /^the stderr should contain "([^\"]*)"$/ do |partial_output|
Then /^the stdout should contain "([^\"]*)"$/ do |partial_output|
Then /^the stderr should not contain "([^\"]*)"$/ do |partial_output|
Then /^the stdout should not contain "([^\"]*)"$/ do |partial_output|

Then /^the following files should exist:$/ do |files|
Then /^the following files should not exist:$/ do |files|
Then /^the file "([^\"]*)" should contain "([^\"]*)"$/ do |file,
partial_content|
Then /^the file "([^\"]*)" should not contain "([^\"]*)"$/ do |file,
partial_content|
Version 1, updated 572 days ago.
. o 0 ( edit | history )
( add new | see all )