Sha256: f0b8fae4ef6be2a4c38c20f99be777587dd92f05cd496de7bddb134aa1a0f682

Contents?: true

Size: 275 Bytes

Versions: 11

Compression:

Stored size: 275 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

11 entries across 11 versions & 6 rubygems

Version Path
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-mocks-2.13.0/spec/rspec/mocks/bug_report_7611_spec.rb
sshp-0.0.2 vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/bug_report_7611_spec.rb
sshp-0.0.1 vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/bug_report_7611_spec.rb
sidekiq-statsd-0.1.1 vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/bug_report_7611_spec.rb
sidekiq-statsd-0.1.0 vendor/ruby/1.9.1/gems/rspec-mocks-2.13.1/spec/rspec/mocks/bug_report_7611_spec.rb
rspec-mocks-2.13.1 spec/rspec/mocks/bug_report_7611_spec.rb
vagrant-actionio-0.0.9 vendor/bundle/gems/rspec-mocks-2.13.0/spec/rspec/mocks/bug_report_7611_spec.rb
rspec-mocks-2.13.0 spec/rspec/mocks/bug_report_7611_spec.rb
remq-0.0.4 vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_7611_spec.rb
remq-0.0.3 vendor/bundle/gems/rspec-mocks-2.12.2/spec/rspec/mocks/bug_report_7611_spec.rb
rspec-mocks-2.12.2 spec/rspec/mocks/bug_report_7611_spec.rb