http://rspec.rubyforge.org/tutorials/stack_04.html

context "A stack with one item" do
setup do
@stack = Stack.new
@stack.push "one item"
end
specify "should return top when you send it 'top'" do
@stack.top.should_equal "one item"
end
end

は失敗するので(プッシュされた"one item"とshould_equalの"one item"が別のオブジェクトのため)

context "A stack with one item" do
setup do
@stack = Stack.new
@item="one item"
@stack.push @item
end
specify "should return top when you send it 'top'" do
@stack.top.should_equal @item
end
end

同一オブジェクトと比較するか

context "A stack with one item" do
setup do
@stack = Stack.new
@stack.push :item
end
specify "should return top when you send it 'top'" do
@stack.top.should_equal :item
end
end

シンボルで比較するか

context "A stack with one item" do
setup do
@stack = Stack.new
@stack.push "one item"
end
specify "should return top when you send it 'top'" do
@stack.top.should == "one item"
end
end

同じ文字列かどうか見られる==を使うか、ですね。