Sha256: 8f4d908fd54694b932ae4af828b8fa1af609ba405398229cfc766985a422e667

Contents?: true

Size: 709 Bytes

Versions: 7

Compression:

Stored size: 709 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))

describe Tanker::Utilities do

  before(:each) do 
    
    @included_in = Tanker.instance_variable_get :@included_in
    Tanker.instance_variable_set :@included_in, []

    class Dummy
      include Tanker

      tankit 'dummy index' do
        indexes :name
      end

    end
  end

  after(:each) do
    Tanker.instance_variable_set :@included_in, @included_in
  end

  it "should get the models where Tanker module was included" do
    (Tanker::Utilities.get_model_classes - [Dummy]).should == []
  end

  it "should get the available indexes" do
    Tanker::Utilities.get_available_indexes.should == ["dummy index"]
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tanker-1.1.6 spec/utilities_spec.rb
tanker-1.1.5 spec/utilities_spec.rb
tanker-1.1.4 spec/utilities_spec.rb
tanker-1.1.3 spec/utilities_spec.rb
tanker-1.1.2 spec/utilities_spec.rb
tanker-1.1.1 spec/utilities_spec.rb
tanker-1.1.0 spec/utilities_spec.rb