Sha256: 959b6ced969877ea1e09ccb7cd8b64921be42821a01bf86cc477f07e48386d1b

Contents?: true

Size: 1021 Bytes

Versions: 33

Compression:

Stored size: 1021 Bytes

Contents

# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Blacklight do
  
  context "locate_path" do
    
    it "should find app/controllers/application_controller.rb" do
      result = Blacklight.locate_path 'app', 'controllers', 'application_controller.rb'
      result.should_not == nil
    end
    
    it "should not find blah.rb" do
      result = Blacklight.locate_path 'blah.rb'
      result.should == nil
    end
    
  end
  
  context 'root' do

    before(:all) do
      @blroot = File.expand_path(File.join(__FILE__, '..', '..', '..', '..'))
    end

    it 'should return the full path to the BL plugin' do
      Blacklight.root.should == @blroot
    end
    
    it 'should return the full path to the model directory' do
      Blacklight.models_dir.should == @blroot + "/app/models"
    end

    it 'should return the full path to the controllers directory' do
      Blacklight.controllers_dir.should == @blroot + "/app/controllers"
    end

  end
  
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
blacklight-4.1.0 test_support/spec/lib/blacklight_spec.rb
blacklight-4.0.1 test_support/spec/lib/blacklight_spec.rb
blacklight-3.8.2 test_support/spec/lib/blacklight_spec.rb
blacklight-4.0.0 test_support/spec/lib/blacklight_spec.rb
blacklight-4.0.0.rc2 test_support/spec/lib/blacklight_spec.rb
blacklight-4.0.0.rc1 test_support/spec/lib/blacklight_spec.rb
blacklight-4.0.0.pre7 test_support/spec/lib/blacklight_spec.rb
blacklight-4.0.0.pre6 test_support/spec/lib/blacklight_spec.rb
blacklight-3.8.1 test_support/spec/lib/blacklight_spec.rb
blacklight-3.8.0 test_support/spec/lib/blacklight_spec.rb
blacklight-3.7.2 test_support/spec/lib/blacklight_spec.rb
blacklight-3.7.1 test_support/spec/lib/blacklight_spec.rb
blacklight-3.7.0 test_support/spec/lib/blacklight_spec.rb
blacklight-3.6.1.1 test_support/spec/lib/blacklight_spec.rb
blacklight-3.6.0 test_support/spec/lib/blacklight_spec.rb
blacklight-3.5.0 test_support/spec/lib/blacklight_spec.rb
blacklight-3.4.2 test_support/spec/lib/blacklight_spec.rb
blacklight-3.4.1 test_support/spec/lib/blacklight_spec.rb
blacklight-3.4.0 test_support/spec/lib/blacklight_spec.rb
blacklight-3.3.2 test_support/spec/lib/blacklight_spec.rb