Skip to content

Instantly share code, notes, and snippets.

@ukstudio
ukstudio / test.rb
Created February 2, 2012 05:28 — forked from mashiro/test.rb
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
class Foo
def self.show
'foo'
end
end
module Bar
@ukstudio
ukstudio / marker_spec_01.rb
Created June 27, 2011 03:06 — forked from yuya-takeyama/marker_spec_01.rb
RSpec の書き方, メソッド単位に describe で分割するパターンと, オブジェクトの状態単位に context で分割するパターンとあると思う.
# メソッド単位に describe で分割するパターン
require 'spec_helper'
module Codebreaker
describe Marker do
let(:secret) { '1234' }
describe '#exact_match_count' do
subject { Marker.new(secret, guess).exact_match_count }
# use moro-miso
# sudo gem install moro-miso
# http://d.hatena.ne.jp/moro/20090603/1244042258