Sha256: 1f122e6afdb094eebe2a188fdee3b0d036aaa8e8912d7501424415f12b6faf0e
Contents?: true
Size: 710 Bytes
Versions: 59
Compression:
Stored size: 710 Bytes
Contents
require 'spec_helper' class LiarLiarPantsOnFire def respond_to?(sym, incl_private=false) true end def self.respond_to?(sym, incl_private=false) 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 (class << LiarLiarPantsOnFire; self; end).instance_methods.should_not include("something") end end
Version data entries
59 entries across 59 versions & 12 rubygems