Sha256: b50456bbbde9820f3357be422820dfc81427c3eef8ac1e4e10bd93677ff316f2

Contents?: true

Size: 905 Bytes

Versions: 23

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\/admins_repository.rb/)
    expect(locations[:test][1]).to match(/example\/admins\/repository\/test\/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

23 entries across 23 versions & 1 rubygems

Version Path
smart_ioc-0.5.2 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.5.1 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.5.0 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.4.0 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.2.1 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.2.0 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.1.30 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.1.29 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.1.28 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.1.27 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.1.26 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.1.25 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.1.24 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.1.23 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.1.22 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.1.21 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.1.20 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.1.19 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.1.18 spec/smart_ioc/bean_locator_spec.rb
smart_ioc-0.1.17 spec/smart_ioc/bean_locator_spec.rb