save_and_open_page
have_button(locator)
1) List all the commands to not be corrected in ~/.zsh_nocorrect, 1 per line. | |
2) Add to ~/.zshrc: | |
if [ -f ~/.zsh_nocorrect ]; then | |
while read -r COMMAND; do | |
alias $COMMAND="nocorrect $COMMAND" | |
done < ~/.zsh_nocorrect | |
fi |
Then /^I should see each item listed in alphabetical order in the items section$/ do | |
@items.each_with_index do |item, index| | |
find(:xpath, "//*[@id='items']/ul[@class='items']/li[#{index+1}]").inspect.should eq(find("li#item-#{item.friendly_id}").inspect) | |
@item = item | |
step "I should see the item listed in the items section" | |
end | |
end | |
Then /^I should( not)? see the item listed in the items section$/ do |negation| | |
assertion = negation ? :should_not : :should |
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
#Sass Snippets | |
snippet @i | |
@import "${1}"; | |
snippet ext | |
@extend ${1}; | |
snippet inc | |
@include ${1}(${2});${3} | |
snippet @m | |
@media ${1} { | |
${2} |
Number.prototype.number_with_delimiter = function(delimiter) { | |
var number = this + '', delimiter = delimiter || ','; | |
var split = number.split('.'); | |
split[0] = split[0].replace( | |
/(\d)(?=(\d\d\d)+(?!\d))/g, | |
'$1' + delimiter | |
); | |
return split.join('.'); | |
}; |
# RSpec matcher to spec delegations. | |
# | |
# Usage: | |
# | |
# describe Post do | |
# it { should delegate(:name).to(:author).with_prefix } # post.author_name | |
# it { should delegate(:month).to(:created_at) } | |
# it { should delegate(:year).to(:created_at) } | |
# end |
:sunny: | |
:zap: | |
:leaves: | |
:lipstick: | |
:cop: | |
:wheelchair: | |
:fish: | |
:hammer: | |
:moneybag: | |
:calling: |
# extract_fixtures.rake | |
# by Paul Schreiber <paulschreiber at gmail.com> | |
# 15 June 2010 | |
# | |
# I got this from Peter Gulezian <http://metoca.net/> | |
# Looks like another version is here | |
# <http://redmine.rubyforge.org/svn/trunk/lib/tasks/extract_fixtures.rake> | |
# | |
# This is the inverse of the built-in rake db:fixtures:load | |
# |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |