Sha256: 05ae6426f9308cd649ecc105c85f209353f42f58f97d206f5bdf0bf1c9e952a0
Contents?: true
Size: 929 Bytes
Versions: 16
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
16 entries across 16 versions & 1 rubygems