Sha256: dbbc470bd5a1c515cdcbff2ce52eb5d82f46ff3541e5721e4aeef53df6df2705

Contents?: true

Size: 774 Bytes

Versions: 24

Compression:

Stored size: 774 Bytes

Contents

require 'spec_helper'

require 'rad'
require 'rad/spec/environment'

describe "Environment basic spec" do    
  the_spec_dir = with_tmp_spec_dir
  
  with_load_path(
    "#{the_spec_dir}/plugin_a/lib", 
    "#{the_spec_dir}/plugin_b/lib", 
    "#{the_spec_dir}/app/lib"
  )
  
  before do
    rad.runtime_path = the_spec_dir, true
    $spec_result = []
  end
  
  after :all do
    rad.delete_all :custom_component
  end
  
  before do
    load "app/init.rb"
  end  
  
  it "core components" do
    rad.logger.should_not be_nil
    rad.environment.should_not be_nil
    rad.config.should_not be_nil
  end
  
  it "loading order" do
    rad.environment
    rad.register(:custom_component){true}
    rad.custom_component
    $spec_result.should == %w(init plugin_a)
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rad_core-0.2.6 spec/environment/standard_app_spec.rb
rad_core-0.2.5 spec/environment/standard_app_spec.rb
rad_core-0.2.4 spec/environment/standard_app_spec.rb
rad_core-0.2.3 spec/environment/standard_app_spec.rb
rad_core-0.2.2 spec/environment/standard_app_spec.rb
rad_core-0.2.1 spec/environment/standard_app_spec.rb
rad_core-0.2.0 spec/environment/standard_app_spec.rb
rad_core-0.0.30 spec/environment/standard_app_spec.rb
rad_core-0.0.29 spec/environment/standard_app_spec.rb
rad_core-0.0.28 spec/environment/standard_app_spec.rb
rad_core-0.0.27 spec/environment/standard_app_spec.rb
rad_core-0.0.26 spec/environment/standard_app_spec.rb
rad_core-0.0.25 spec/environment/standard_app_spec.rb
rad_core-0.0.24 spec/environment/standard_app_spec.rb
rad_core-0.0.23 spec/environment/standard_app_spec.rb
rad_core-0.0.22 spec/environment/standard_app_spec.rb
rad_core-0.0.21 spec/environment/standard_app_spec.rb
rad_core-0.0.20 spec/environment/standard_app_spec.rb
rad_core-0.0.19 spec/environment/standard_app_spec.rb
rad_core-0.0.18 spec/environment/standard_app_spec.rb