Module: TestUtils::SpecIndexing

Defined in:
common/test_utils.rb

Overview

the first time a factory is created, backend session will be set; rather than have the indexer login, use the same session

Defined Under Namespace

Modules: Methods

Class Method Summary collapse

Class Method Details

.get_indexerObject



151
152
153
154
155
156
157
158
159
160
# File 'common/test_utils.rb', line 151

def self.get_indexer
  @periodic ||= PeriodicIndexer.new(AppConfig[:backend_url]).instance_eval do
    def 
      @current_session = JSONModel::HTTP.current_backend_session
      @current_session
    end

    self
  end
end

.get_pui_indexerObject



162
163
164
165
166
167
168
169
170
171
# File 'common/test_utils.rb', line 162

def self.get_pui_indexer
  @pui ||= PUIIndexer.new(AppConfig[:backend_url]).instance_eval do
    def 
      @current_session = JSONModel::HTTP.current_backend_session
      @current_session
    end

    self
  end
end