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 FashionSituation do | |
before { @situation = FashionSituation.new(:shirt => false, :shoes => false, :shorts => true) } | |
it "should be inappropriate at a restaurant" do | |
@situation.location = 'restaurant' | |
@situation.should_not be_appropriate | |
end | |
it "should be inappropriate at work" do | |
@situation.location = 'work' | |
@situation.should_not be_appropriate | |
end |
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
require 'pp' | |
votes = { | |
"gus" => ["Colonel Panic", "Cigar Heroes"], | |
"shinji" => ["Bomb Squad","Taco Town"], | |
"nawara" => ["Colonel Panic", "Taco Town", "Danger!! Death Ray"], | |
"dodos" => [], | |
"richie" => ["Bomb Squad", "Death Ray", "Bomb Ray Death Squad"], | |
"colin" => ["Colonel Panic", "Taco Town"], | |
"joey" => ["Danger!! Death Ray", "Bomb Squad"] |
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
AppTweeter = Struct.new(:status) do | |
class << self | |
def new_user(user) | |
update("#{user.name} just signed up!") | |
end | |
def update(status) | |
status = "[#{Rails.env}] #{status}" unless Rails.env.production? | |
Delayed::Job.enqueue AppTweeter.new(status) | |
end |