changelog shortlog tags changeset manifest revisions annotate raw

vendor/plugins/rspec/spec/spec/mocks/bug_report_8302_spec.rb

changeset 15: 64acf98d15f4
author: moriq@moriq.com
date: Mon Mar 10 10:12:58 2008 +0900 (16 years ago)
permissions: -rw-r--r--
description: add plugins rspec
1require File.dirname(__FILE__) + '/../../spec_helper.rb'
2
3module Bug8302
4 class Foo
5 def Foo.class_method(arg)
6 end
7
8 def instance_bar(arg)
9 end
10 end
11
12 describe "Bug report 8302:" do
13 it "class method is not restored correctly when proxied" do
14 Foo.should_not_receive(:class_method).with(Array.new)
15 Foo.rspec_verify
16 Foo.class_method(Array.new)
17 end
18
19 it "instance method is not restored correctly when proxied" do
20 foo = Foo.new
21 foo.should_not_receive(:instance_bar).with(Array.new)
22 foo.rspec_verify
23 foo.instance_bar(Array.new)
24 end
25 end
26end