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
Given I am on "[page_name]" | |
When I go to "[page_name]" | |
When I press "[button]" | |
When I follow "[link]" | |
When I follow "[link]" within "[parent]" | |
When I fill in "[field]" with "[value]" | |
When I fill in "[value]" for "[field]" | |
When I fill in the following: | |
| field | value | |
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
=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') |
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
== Simulating browser events | |
# GET a URL, following any redirects, and making sure final page is successful | |
visit "/some/url" | |
# In general, elements can be located by their inner text, their 'title' | |
attribute, their 'name' attribute, and their 'id' attribute. | |
# They can be selected using a String, which is converted to an escaped Regexp | |
effectively making it a substring match, or using a Regexp. | |
# An exception is that using Strings for ids are compared exactly (using ==) |
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/database.yml | |
config/s3_credentials.yml | |
tmp/**/* | |
.DS_Store | |
doc/api | |
doc/app | |
doc/plugins | |
doc/*.dot | |
coverage/* | |
db/*.sqlite3 |
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
ruby -e "$(curl -fsS http://gist.github.com/raw/323731/install_homebrew.rb)" |
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
RAILS_ROOT/config/environments/development.rb | |
config.gem "rails-footnotes" | |
environment.rb or | |
in an initializer do: | |
if defined?(Footnotes) | |
Footnotes::Filter.prefix = 'txmt://open?url=file://%s&line=%d&column=%d' |
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
<?xml version="1.0"?> | |
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> | |
<cross-domain-policy> | |
<allow-access-from domain="*" /> | |
</cross-domain-policy> |
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' | |
IRB.conf[:AUTO_INDENT] = false | |
IRB.conf[:USE_READLINE] = true | |
class Object | |
# easy way to list an object's methods without clutter | |
def local_methods | |
(methods - Object.instance_methods).sort | |
end | |
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
def a | |
puts 'a' | |
end | |
ma = method :a | |
mma=ma.to_proc | |
mmma = Kernel.send :define_method ,:new_method, &mma | |
mmma2 = Kernel.send :define_method ,:new_method2, mma | |
new_method | |
new_method2 |
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
git config --global core.excludesfile ~/.git_global_ignore |