Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d7a19d
commit 933cbe7
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,22 @@ | ||
require 'spec_helper' | ||
|
||
class Glass; end | ||
|
||
class Cachaça; end | ||
|
||
Spec::Matchers.define :cachaça do | ||
match do |actual| | ||
Cachaça === actual | ||
end | ||
end | ||
|
||
describe "glass" do | ||
context "when empty" do | ||
it "should be filled with cachaça" do | ||
glass = Glass.new | ||
glass.should_receive(:fill).with(cachaça) | ||
glass.fill(Cachaça.new) | ||
end | ||
end | ||
end | ||
|