Skip to content

Instantly share code, notes, and snippets.

@mcrmfc
mcrmfc / gist:938864
Created April 23, 2011 18:47 — forked from leshill/gist:870866
Cucumber/Capybara JS alert handling
# Add this to more_web_steps.rb
# Selenium docs: http://code.google.com/p/selenium/wiki/RubyBindings#Javascript_Alert/Confirm today!
When /^I (accept|dismiss) the "([^"]*)" alert$/ do |action, text|
alert = page.driver.browser.switch_to.alert
alert.text.should eq(text)
alert.send(action)
end
@mcrmfc
mcrmfc / .gitconfig
Created May 23, 2011 14:36
.gitconfig
[core]
editor = "mvim -f -c 'au VimLeave * !open -a Terminal'"
[merge]
tool = vimdiff
guitool = mvim
[diff]
tool = vimdiff
guitool = mvim
[mergetool "mvim"]
cmd = mvim -f -d "$LOCAL" "$MERGED" "$REMOTE"