Sha256: c5eef4309b898a053b6137390b7f0549536c4f55f0eced73cf3ef35bc2cb649c

Contents?: true

Size: 311 Bytes

Versions: 3

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

3 entries across 3 versions & 1 rubygems

Version Path
picolena-0.1.6 rails_plugins/rspec/spec/spec/mocks/bug_report_7611_spec.rb
picolena-0.1.7 rails_plugins/rspec/spec/spec/mocks/bug_report_7611_spec.rb
picolena-0.1.8 rails_plugins/rspec/spec/spec/mocks/bug_report_7611_spec.rb