Sha256: 458a6e05c40aaaa552986d46758e589002b1aaec54640e5a3ad58e65bcf15fce

Contents?: true

Size: 905 Bytes

Versions: 12

Compression:

Stored size: 905 Bytes

Contents

require 'spec_helper'

describe SmartIoC::BeanLocator do
  before :all do
    SmartIoC.clear

    locator = SmartIoC::BeanLocator.new
    current_dir = File.expand_path(File.dirname(__FILE__))
    locator.locate_beans(:test, File.join(current_dir, 'example'))
  end

  it {
    locations = SmartIoC::BeanLocations.get_bean_locations(:repository)

    expect(locations[:test].size).to eq(3)
    expect(locations[:test][0]).to match(/example\/admins\/repository\/test\/admins_repository.rb/)
    expect(locations[:test][1]).to match(/example\/admins\/repository\/admins_repository.rb/)
    expect(locations[:test][2]).to match(/example\/users\/repository\/users_repository.rb/)
  }

  it {
    locations = SmartIoC::BeanLocations.get_bean_locations(:users_creator)

    expect(locations[:test].size).to eq(1)
    expect(locations[:test].first).to match(/example\/users\/services\/users_creator.rb/)
  }
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
smart_ioc-0.3.9 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.3.8 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.3.7 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.3.6 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.3.5 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.3.2 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.3.1 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.3.0 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.2.5 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.2.4 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.2.3 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.2.2 spec/smart_ioc/bean_locator_spec.rb