You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xdotcommer edited this page Sep 13, 2010
·
21 revisions
Example:
require ‘custom_matcher’
matcher(:be_divisible_by) { |n, d| n % d = = 0 }
matcher(:be_even) {|even| even % 2 = = 0}
describe “6” do
it “should be divisible by 3” do
6.should be_divisible_by(3)
end
it “should not be divisible by 12” do
6.should_not be_divisible_by(12)
end
it “should be even” do
6.should be_even
end
end