Sha256: 4b26e624ed56baf4c0b710104a49fe3ab2560a207ee627f7dc6f3755f2ea1482
Contents?: true
Size: 684 Bytes
Versions: 3
Compression:
Stored size: 684 Bytes
Contents
require File.dirname(__FILE__) + '/../../spec_helper.rb' class LiarLiarPantsOnFire def respond_to?(sym) true end def self.respond_to?(sym) true end end describe 'should_receive' do before(:each) do @liar = LiarLiarPantsOnFire.new end it "should work when object lies about responding to a method" do @liar.should_receive(:something) @liar.something end it 'should work when class lies about responding to a method' do LiarLiarPantsOnFire.should_receive(:something) LiarLiarPantsOnFire.something end it 'should cleanup after itself' do LiarLiarPantsOnFire.metaclass.instance_methods.should_not include("something") end end
Version data entries
3 entries across 3 versions & 1 rubygems