Skip to content

Instantly share code, notes, and snippets.

@mmmries
mmmries / merchant_account_spec.rb
Created April 16, 2013 17:20
How can a get good error messages about which parameters I was using when the test failed?
require 'spec_helper'
describe MerchantAccount do
it "can find an appropriate merchant" do
{
'GND130415A' => 'GRAZ_1',
'MIS130417A' => 'GRAZ_2',
'ROA130417A' => 'GRAZ_2',
'LON130417A' => 'GRAZ_3',
}.each do |tour_code, expected_merchant_account_descriptor|
@mmmries
mmmries / bnr_map_point.rb
Last active December 11, 2015 12:48
Whereami sample code for my blog post.
class BNRMapPoint
attr_reader :coordinate, :title
def initialize(coordinate, title)
@coordinate, @title = coordinate, title
end
end
@mmmries
mmmries / lcds.rb
Created August 7, 2012 04:51
borq2
ssd_map = [
[1,1,1,0,1,1,1], #0
[0,0,1,0,0,1,0], #1
[1,0,1,1,1,0,1], #2
[1,0,1,1,0,1,1], #3
[0,1,1,1,0,1,0], #4
[1,1,0,1,0,1,1], #5
[1,1,0,1,1,1,1], #6
[1,0,1,0,0,1,0], #7
[1,1,1,1,1,1,1], #8