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
Verifying that +jessemiller is my openname (Bitcoin username). https://onename.com/jessemiller |
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
// Setup a namespace to use for all our classes, we just do this to avoid conflicts with other libraries | |
if (typeof tdd === "undefined") { | |
tdd = {}; | |
} | |
tdd.BananaPopulator = Class.extend({ | |
defaults: { | |
ajax: $.ajax | |
}, | |
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
test("After /bananas returns a json struct, banana-selector should be populated", function() { | |
var fakeBananaJson = [{id:5, color:"yellow"},{id:2, color:"green"}] | |
var fakeAjax = function( params ) { | |
params.success( fakeBananaJson ); | |
} | |
var populator = new tdd.BananaPopulator({ | |
ajax: fakeAjax | |
}); | |
equal( $('#banana-selector option').length, 2, 'There should be 2 options on the banana selector' ); | |
}); |
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
// Setup a namespace to use for all our classes, we just do this to avoid conflicts with other libraries | |
if (typeof tdd === "undefined") { | |
tdd = {}; | |
} | |
tdd.BananaPopulator = Class.extend({ | |
defaults: { | |
ajax: $.ajax | |
}, | |
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
<!-- Testing pairs --> | |
<script type="text/javascript" src="banana-populator.js"></script> | |
<script type="text/javascript" src="../public/javascripts/banana-populator.js"></script> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Always Be Testing</title> | |
<link rel="stylesheet" href="qunit.css" type="text/css"/> | |
<script type="text/javascript" src="qunit.js"></script> | |
<script type="text/javascript" src="jquery.js"></script> | |
<script type="text/javascript" src="../public/javascripts/resig.js"></script> | |
</head> |
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
Day Job: | |
Cofounder of Attachments.me | |
Open Source contribution (if any): | |
Wrote and maintain HamlPy, a Haml implmentation for Django. | |
Tell me about your experience with Ruby/Rails: | |
Our entire web frontend is written in Rails. I had always played with Ruby and Rails before Attachments.me but this was my first huge project with it. Really enjoying it. | |
How do you use GitHub: |
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
class Account(): | |
def __init__(self): | |
self.balance = 0 | |
self.currency = 'CAD' | |
self.overdraft = False | |
def make_deposit(self, amount): | |
"""imagine a boat load of business logic that would make this useful""" | |
pass |