Sha256: cf2c9c9140aca0da4affa823ba597d7eef666c8139bf78a4ca43caa509133338

Contents?: true

Size: 311 Bytes

Versions: 10

Compression:

Stored size: 311 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper.rb'

module Bug7611
  class Foo
  end

  class Bar < Foo
  end

  describe "A Partial Mock" do
    it "should respect subclasses" do
      Foo.stub!(:new).and_return(Object.new)
    end

    it "should" do
      Bar.new.class.should == Bar
    end 
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rspec-0.9.0 spec/spec/mocks/bug_report_7611_spec.rb
rspec-0.9.1 spec/spec/mocks/bug_report_7611_spec.rb
rspec-0.9.2 spec/spec/mocks/bug_report_7611_spec.rb
rspec-0.9.3 spec/spec/mocks/bug_report_7611_spec.rb
rspec-0.9.4 spec/spec/mocks/bug_report_7611_spec.rb
rspec-1.0.0 spec/spec/mocks/bug_report_7611_spec.rb
rspec-1.0.1 spec/spec/mocks/bug_report_7611_spec.rb
rspec-1.0.2 spec/spec/mocks/bug_report_7611_spec.rb
rspec-1.0.3 spec/spec/mocks/bug_report_7611_spec.rb
rspec-1.0.4 spec/spec/mocks/bug_report_7611_spec.rb