🕷 software projects

by ryan davis



sitemap

yoda

Spec yoda will, and spec you shall too.

Spec yoda will, and spec you shall too.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class Bowling
  def hit(pins)
  end

  def score
    0
  end
end

require 'yoda'

Bowling.yoda {
  "score 0 for gutter game".it_will {
    bowling = Bowling.new
    20.times { bowling.hit(0) }

    bowling.score 0.it_is?
    bowling.score 42.it_is_not!
  }
}

Requirements

  • rubygems
  • midichlorians

Get The Code

If you just want to use yoda, you can install it via RubyGems:
gem install yoda
Fork me on GitHub If you want to hack on yoda, clone it from GitHub:
git clone git://github.com/seattlerb/yoda

Latest Activity