Last active
February 28, 2016 15:35
-
-
Save cyril/019f363856b70a1a1263 to your computer and use it in GitHub Desktop.
A spec for the Duck class in Ruby
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
# duck_spec.rb | |
require_relative 'duck' | |
require 'fix' | |
@bird = Duck.new | |
Fix.describe @bird do | |
on :swims do | |
it { MUST eql 'Swoosh...' } | |
end | |
on :speaks do | |
it { MUST raise_exception NoMethodError } | |
end | |
on :sings do | |
it { MAY eql '♪... ♫...' } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment