Module: ActiveGroonga::TestFixtures — activegroonga - Ranguba

Module: ActiveGroonga::TestFixtures

Included in:
ActiveSupport::TestCase
Defined in:
lib/active_groonga/fixtures.rb

Defined Under Namespace

Classes: ConnectionMock

Instance Method Summary (collapse)

Instance Method Details

- (Object) load_active_groonga_fixtures



40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/active_groonga/fixtures.rb', line 40

def load_active_groonga_fixtures
  @loaded_fixtures ||= {}
  fixtures = Fixtures.create_fixtures(fixture_path, fixture_table_names, fixture_class_names) do
    ConnectionMock.new
  end
  unless fixtures.nil?
    if fixtures.instance_of?(Fixtures)
      @loaded_fixtures[fixtures.name] = fixtures
    else
      fixtures.each { |f| @loaded_fixtures[f.name] = f }
    end
  end
end

- (Object) setup_fixtures_with_active_groonga



27
28
29
30
31
32
33
34
# File 'lib/active_groonga/fixtures.rb', line 27

def setup_fixtures_with_active_groonga
  setup_fixtures_without_active_groonga

  @fixture_cache ||= {}
  @@already_loaded_fixtures ||= {}

  load_active_groonga_fixtures
end

- (Object) teardown_fixtures_with_active_groonga



36
37
38
# File 'lib/active_groonga/fixtures.rb', line 36

def teardown_fixtures_with_active_groonga
  teardown_fixtures_without_active_groonga
end