Sha256: 495c01a620eee6ca77fa69ebbe338b5617a9c2c190992b5ad9653aea32a6bece

Contents?: true

Size: 533 Bytes

Versions: 49

Compression:

Stored size: 533 Bytes

Contents

class Tests
  class << self

    def drop_all_tables
      connection = ::ActiveRecord::Base.connection
      connection.tables.each do |table|
        connection.drop_table table
      end
    end

    def migrate_test_database
      print "\033[30m" # dark gray text
      drop_all_tables
      ::ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")
      print "\033[0m"
    end

    def response_delay
      @response_delay ||= 0
    end

    def response_delay=(seconds)
      @response_delay = seconds
    end

  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
upjs-rails-0.14.0 spec_app/app/models/tests.rb
upjs-rails-0.13.0 spec_app/app/models/tests.rb
upjs-rails-0.12.5 spec_app/app/models/tests.rb
upjs-rails-0.12.4 spec_app/app/models/tests.rb
upjs-rails-0.12.3 spec_app/app/models/tests.rb
upjs-rails-0.12.2 spec_app/app/models/tests.rb
upjs-rails-0.12.1 spec_app/app/models/tests.rb
upjs-rails-0.12.0 spec_app/app/models/tests.rb
upjs-rails-0.11.1 spec_app/app/models/tests.rb
upjs-rails-0.11.0 spec_app/app/models/tests.rb
upjs-rails-0.10.5 spec_app/app/models/tests.rb
upjs-rails-0.10.4 spec_app/app/models/tests.rb
upjs-rails-0.10.3 spec_app/app/models/tests.rb
upjs-rails-0.10.2 spec_app/app/models/tests.rb
upjs-rails-0.10.1 spec_app/app/models/tests.rb
upjs-rails-0.10.0 spec_app/app/models/tests.rb
upjs-rails-0.9.1 spec_app/app/models/tests.rb
upjs-rails-0.9.0 spec_app/app/models/tests.rb
upjs-rails-0.8.2 spec_app/app/models/tests.rb
upjs-rails-0.8.1 spec_app/app/models/tests.rb