This file contains hidden or 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
DOCS: http://rubydoc.info/github/jnicklas/capybara/master/file/README.rdoc | |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
current_path.should == post_comments_path(post) | |
=Clicking links and buttons= | |
click_link('id-or-text') | |
click_button('id-or-text') |
This file contains hidden or 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
# How Clearance / Hoptoad does it | |
module Clearance | |
class << self | |
attr_accessor :configuration | |
end | |
def self.configure | |
self.configuration ||= Configuration.new | |
yield(configuration) | |
end |
This file contains hidden or 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
function github { | |
branch="$(git rev-parse --abbrev-ref HEAD)" | |
url="$(git config --get remote.upstream.url)" | |
url=${url/[email protected]:/http://github.com/} | |
url=${url/.git/} | |
if [[ $1 =~ "compare" ]]; then action="compare" | |
elif [[ $1 =~ "pr" ]]; then action="pull" | |
else action="tree"; fi |