Sha256: 0ac8fbb25cd1db0c06d7e554c069ee851518ed4f69e26d1bdd517e9e25f27f8c

Contents?: true

Size: 445 Bytes

Versions: 3

Compression:

Stored size: 445 Bytes

Contents

require "spec_helper"

describe Spank::IOC do
  context "when bound to a container" do
    let(:container) { fake }
    let(:component) { fake }

    before :each do
      container.stub(:resolve).with(:idbconnection).and_return(component)
      Spank::IOC.bind_to(container)
    end

    let(:result) { Spank::IOC.resolve(:idbconnection) }

    it "should resove items from that container" do
      result.should == component
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spank-0.0.1369197619 spec/unit/ioc_spec.rb
spank-0.0.1369197478 spec/unit/ioc_spec.rb
spank-0.0.2 spec/unit/ioc_spec.rb