Sha256: e56fff8a545aaf8a722750e5ff587076d0865f133138791ff3b558fd9ce6875f
Contents?: true
Size: 929 Bytes
Versions: 12
Compression:
Stored size: 929 Bytes
Contents
require 'spec_helper' module RSpec module Matchers describe "eq" do it "matches when actual == expected" do 1.should eq(1) end it "does not match when actual != expected" do 1.should_not eq(2) end it "describes itself" do matcher = eq(1) matcher.matches?(1) matcher.description.should == "== 1" end it "provides message, expected and actual on #failure_message" do matcher = eq("1") matcher.matches?(1) matcher.failure_message_for_should.should == "\nexpected \"1\"\n got 1\n\n(compared using ==)\n" end it "provides message, expected and actual on #negative_failure_message" do matcher = eq(1) matcher.matches?(1) matcher.failure_message_for_should_not.should == "\nexpected 1 not to equal 1\n\n(compared using ==)\n" end end end end
Version data entries
12 entries across 12 versions & 1 rubygems