Created
July 12, 2011 02:58
-
-
Save okitan/1077307 to your computer and use it in GitHub Desktop.
こういうのがいいかな
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
each_context { | |
'Aの場合' => { :key => 'a' }, | |
'Bの場合' => { :key => 'b' }, | |
} do | |
it { ... } | |
end | |
__EOF__ | |
{ | |
'Aの場合' => { :key => 'a' }, | |
'Bの場合' => { :key => 'b' }, | |
}.each do |desc, opt| | |
context(desc) do | |
before(:all) { __memorized.clear } | |
before(:all) { opt.each {|k, v| self.class.let(k) { value } } | |
it { ... } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment