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
describe("games", function() { | |
subject("game", function() { game }); | |
describe("Basketball Game", function() { | |
given(game, function() { new BasketballGame(); }); | |
its("fieldGoal.points", function() { expect.toEqual(2); }); | |
}) | |
describe("Football Game", function() { | |
given(game, function() { new FootballGame(); }); | |
its("fieldGoal.points", function() { expect.toEqual(3); }); | |
}); |
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
task :kill_spork do | |
spork_processes = `ps aux | grep spork | egrep -v grep | awk '{print $2}'`.split("\n") | |
spork_processes.each do |process| | |
system("kill #{process}") | |
end | |
end | |
task :spec => [:kill_spork, :cucumber] |
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
#!/bin/sh | |
for k in `git branch -r|awk '{print $1}'`;do echo `git show --pretty=format:"%Cgreen%ci %Cblue%cr %Cred%cn %Creset" $k|head -n 1`\\t$k;done|sort -r | |
echo "If you're unable to remove a branch, it may already be gone from the remote. Try git remote prune origin (git remote prune --dry-run origin) to see what remote branch references will be deleted" |
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
/* | |
We have two classes: resultRenderer and dbQuery | |
resultRenderer will ask dbQuery to perform a database query, and asyncronously receives the results | |
*/ | |
function resultRenderer(query) { this._query = query } | |
resultRenderer.prototype = { | |
queryResultsAndRender: function () { | |
this._query.runQueryAsync(this.renderResults.bind(this)); |
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
beforeEach(function() { | |
this.addMatchers({ | |
toEqualSomethingIn : function toEqualSomethingIn(possibleOutputs) { | |
this.message = function() { | |
return [ | |
"Expected " + this.actual + " to be one of the following: "+ possibleOutputs, | |
"Expected " + this.actual + " not to be one of the following: "+ possibleOutputs + ", but it was" | |
]; | |
}; | |
return (possibleOutputs.indexOf(this.actual) != -1) |
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
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
describe "Something doppelganger" do | |
describe "RailCar" do | |
let(:gateway) { RailCar.new :login => "a", :password => "b" } | |
describe "#commit" do | |
let(:response) { railcar.send :commit, request, {} } | |
describe "response" do |
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
--type-set | |
haml=.haml |
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
for k in `git branch -r|perl -pe s/^..//`;do echo -e `git show --pretty=format:"%Cgreen%ci %Cblue%cr %Cred%cn %Creset" $k|head -n 1`\\t$k;done|sort -r |
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
name: "Default Touch Params" | |
longTapDelay: 750 | |
distanceToScrollPriority: 50 | |
distanceTriggeringHorizontalSwipe: 15 | |
distanceTriggeringVerticalSwipe: 14 |
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
require 'nokogiri' | |
string = <<-STRING | |
<rss version="2.0"> | |
<channel> | |
<title>thing</title> | |
<link>http://thing</link> | |
<description>blah</description> <language>en-us</language> | |
<ttl>120</ttl> | |
<item> <title>Here's some title 0!!!</title> <link>http://some-crazy-link<link> <guid isPermaLink="true">some-other-crazy-link<guid> <comments>still more links</comments> <pubDate>Wed, 24 Jul 2013 12:08:37 +0000</pubDate> <description>What a cool description</description> <enclosure url="oh-my-god-so-many-links"/> </item> | |
<item> <title>Here's some title 1!!!</title> <link>http://some-crazy-link<link> <guid isPermaLink="true">some-other-crazy-link<guid> <comments>still more links</comments> <pubDate>Wed, 24 Jul 2013 12:08:37 +0000</pubDate> <description>What a cool description</description> <enclosure url="oh-my-god-so-many-links"/> </item> |
OlderNewer