Sha256: 9b4f5e5e17c73e8fbb25cf39da9de94de9a0ecef46eaf5127f9960aad407190f

Contents?: true

Size: 739 Bytes

Versions: 1

Compression:

Stored size: 739 Bytes

Contents

require 'spec_helper'
require 'server_helper'

require 'kangaroo/util/loader'

module Kangaroo
  module Util
    describe Loader do
      # include TestServerHelper

      def config_file
        File.join File.dirname(__FILE__), '..', 'test_env', 'test.yml'
      end
      
      it "replaces wildcards in model names" do
        loader = Loader.new ['res.*'], nil
        
        loader.model_names.should == ['res.%']
      end

      it "uses global wildcard if model_names = :all" do
        loader = Loader.new :all, nil

        loader.model_names.should == ['%']
      end

      it 'it ignores empty models' do
        loader = Loader.new nil, nil
        
        loader.model_names.should be_empty
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kangaroo-0.1.0.alpha1 spec/util/loader_spec.rb