Sha256: 7b4528e07a10ade8e3cba607e518ad82f95ba64132602df04e66ee86fe794576

Contents?: true

Size: 274 Bytes

Versions: 38

Compression:

Stored size: 274 Bytes

Contents

require 'spec_helper'

module Bug7611
  describe "A Partial Mock" do
    class Foo; end
    class Bar < Foo; end

    it "respects subclasses" do
      Foo.stub(:new).and_return(Object.new)
    end

    it "should" do
      expect(Bar.new.class).to eq Bar
    end
  end
end

Version data entries

38 entries across 38 versions & 8 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/rspec-mocks-2.14.6/spec/rspec/mocks/bug_report_7611_spec.rb
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/rspec-mocks-2.14.6/spec/rspec/mocks/bug_report_7611_spec.rb
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rspec-mocks-2.14.6/spec/rspec/mocks/bug_report_7611_spec.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rspec-mocks-2.14.6/spec/rspec/mocks/bug_report_7611_spec.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rspec-mocks-2.14.6/spec/rspec/mocks/bug_report_7611_spec.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rspec-mocks-2.14.6/spec/rspec/mocks/bug_report_7611_spec.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rspec-mocks-2.14.6/spec/rspec/mocks/bug_report_7611_spec.rb
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/rspec-mocks-2.14.6/spec/rspec/mocks/bug_report_7611_spec.rb
rspec-mocks-2.99.4 spec/rspec/mocks/bug_report_7611_spec.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/rspec-mocks-2.14.6/spec/rspec/mocks/bug_report_7611_spec.rb
rspec-mocks-2.99.3 spec/rspec/mocks/bug_report_7611_spec.rb
rspec-mocks-2.99.2 spec/rspec/mocks/bug_report_7611_spec.rb
dxruby_rp5-0.0.4 spec/vendor/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_7611_spec.rb
rspec-mocks-2.99.1 spec/rspec/mocks/bug_report_7611_spec.rb
rspec-mocks-2.99.0 spec/rspec/mocks/bug_report_7611_spec.rb
rspec-mocks-2.99.0.rc1 spec/rspec/mocks/bug_report_7611_spec.rb
rspec-mocks-2.14.6 spec/rspec/mocks/bug_report_7611_spec.rb
rspec-mocks-2.99.0.beta2 spec/rspec/mocks/bug_report_7611_spec.rb
rspec-mocks-2.14.5 spec/rspec/mocks/bug_report_7611_spec.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_7611_spec.rb