Sha256: dafb22b669bde87978d2966b76b31e9c0b9c6705f670d5b4cde82d4a79996d0c

Contents?: true

Size: 668 Bytes

Versions: 1

Compression:

Stored size: 668 Bytes

Contents

require File.dirname(__FILE__) + "/../spec_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

1 entries across 1 versions & 1 rubygems

Version Path
caricature-0.7.2 spec/bacon/integration/indexer_spec.rb