Skip to content

Instantly share code, notes, and snippets.

@dbwest
dbwest / 0_README.md
Created April 26, 2012 20:19
Continuous CoffeeScript testing with Guard and Jasmine

Continuous CoffeeScript testing with Guard and Jasmine

This Gist shows how to set up a Rails project to practice BDD with CoffeeScript, Guard and Jasmine. You can see this setup in action on Vimeo

  • Install Gems with Bundler with bundle install
  • Define your guards with mate Guardfile
  • Initialize Jasmine with bundle exec jasmine init
  • Configure Jasmine with mate spec/support/yasmine.ym
  • Start Guard with bundle exec guard
@dbwest
dbwest / gist:2502754
Created April 26, 2012 20:16
Programming time savers
dbwest:
vim modal editing
zen coding (quick html)
@dbwest
dbwest / README.md
Last active August 29, 2015 14:15
Readme for Stock

Stock Helper

Looking for an alternative to using instance variables across steps in Cucumber?

Example Usages

An alternative to having a whole bunch instance variables with unknown values polluting your steps

Without stock:

@dbwest
dbwest / gist:9975350
Created April 4, 2014 14:02
CURL / Ruby / JIRA /Watir-Webdriver screenshot
@browser.screenshot.save 'my_screenshot.png'
`curl -D- -X POST -H "Authorization: Basic YOUR_USERNAME_AND_PASS_IN_BASE64" -H "X-Atlassian-Token: nocheck" -F "file=@my_screenshot.png" http://jira.mycompany.com/rest/api/2/issue/PROJ-123/attachments`
"^\$?\-?([1-9]{1}[0-9]{0,2}(\,\d{3})*(\.\d{0,2})?|[1-9]{1}\d{0,}(\.\d{0,2})?|0(\.\d{0,2})?|(\.\d{1,2}))$|^\-?\$?([1-9]{1}\d{0,2}(\,\d{3})*(\.\d{0,2})?|[1-9]{1}\d{0,}(\.\d{0,2})?|0(\.\d{0,2})?|(\.\d{1,2}))$|^\(\$?([1-9]{1}\d{0,2}(\,\d{3})*(\.\d{0,2})?|[1-9]{1}\d{0,}(\.\d{0,2})?|0(\.\d{0,2})?|(\.\d{1,2}))\)$"