Sha256: ced08f63a241a6864c21c1057d1a0512306f742dd4dece920db2c6deb3073ba1

Contents?: true

Size: 669 Bytes

Versions: 3

Compression:

Stored size: 669 Bytes

Contents

require File.dirname(__FILE__) + "/../bacon_helper"

describe "CLR to CLR interactions" do

  describe "when isolating CLR classes" do

    describe "that have an indexer" do
      before do
        @cons = ClrModels::IndexerCaller.new
        @ind = Caricature::Isolation.for(ClrModels::IndexerContained)
      end

      it "should work without expectations" do
        @cons.call_index_on_class(@ind, "key1").should.be.nil
      end

      it "should work with an expectation" do
        @ind.when_receiving(:__getitem__).return("5")
        
        @cons.call_index_on_class(@ind, "key1").should.equal "5"
      end


    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
caricature-0.7.1 spec/integration/indexer_spec.rb
caricature-0.7.0 spec/integration/indexer_spec.rb
caricature-0.6.3 spec/integration/indexer_spec.rb