Sha256: 37e0c49ca12d10c1c58a7ce1059bc3c35055a45936b265b52ba6ca3491f78223

Contents?: true

Size: 827 Bytes

Versions: 40

Compression:

Stored size: 827 Bytes

Contents

module Marty; module RSpec; module Setup
  def marty_whodunnit
    Mcfly.whodunnit = Marty::User.find_by_login('marty')
  end

  def load_scripts(path, dt)
    Marty::Script.load_scripts(path, dt)
    Marty::ScriptSet.clear_cache
  end

  def posting(type, dt, comment)
    Marty::Posting.clear_lookup_cache!
    Marty::Posting.do_create(type, dt, comment)
  end

  def dg_from_import(*args)
    Marty::DataGrid.create_from_import(*args)
  end

  def do_import_summary(*args)
    Marty::DataImporter.do_import_summary(*args)
  end

  def disable_triggers(table_name, &block)
      ActiveRecord::Base.connection.
        execute("ALTER TABLE #{table_name} DISABLE TRIGGER USER;")

      block.call
  ensure
      ActiveRecord::Base.connection.
        execute("ALTER TABLE #{table_name} ENABLE TRIGGER USER;")
  end
end end end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
marty-9.3.0 spec/support/setup.rb
marty-8.5.0 spec/support/setup.rb
marty-8.4.1 spec/support/setup.rb
marty-8.3.1 spec/support/setup.rb
marty-8.2.0 spec/support/setup.rb
marty-8.0.0 spec/support/setup.rb
marty-6.1.0 spec/support/setup.rb
marty-5.2.0 spec/support/setup.rb
marty-5.1.4 spec/support/setup.rb
marty-5.1.3 spec/support/setup.rb
marty-5.1.2 spec/support/setup.rb
marty-5.1.1 spec/support/setup.rb
marty-5.1.0 spec/support/setup.rb
marty-3.1.0 spec/support/setup.rb
marty-3.0.1 spec/support/setup.rb
marty-4.0.0.rc2 spec/support/setup.rb
marty-3.0.0 spec/support/setup.rb
marty-2.9.3 spec/support/setup.rb
marty-2.9.2 spec/support/setup.rb
marty-2.9.1 spec/support/setup.rb