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
/* | |
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
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); }); | |
}); |