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