Sha256: 2987e6520a28bbbef68284a855479d2236f92b2c2ff498d75c9b4ab35e58c6a0

Contents?: true

Size: 907 Bytes

Versions: 3

Compression:

Stored size: 907 Bytes

Contents

module TestApp

  class Application < Rails::Application
    config.active_support.deprecation = :log
  end

end

TestApp::Application.initialize!

TestApp::Application.routes.draw do

  root :to => "main#index"

  match "/questions" => "static#faq", :as => "faq"

  resources :activities

end

module SitemapTestSetup

  def create_db
    # Database
    ActiveRecord::Schema.define(:version => 1) do
      create_table :activities do |t|
        t.string :name
        t.text :contents
        t.string :location
        t.timestamps
      end
    end
    1.upto(8) do |i|
      options = {
        :name => "Coding #{i}",
        :contents => "Lorem ipsum dolor sit",
        :location => "someplace-#{i}"
      }
      Activity.create!(options)
    end
  end

  def drop_db
    ActiveRecord::Base.connection.tables.each do |table|
      ActiveRecord::Base.connection.drop_table(table)
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sitemap-0.1 test/setup.rb
sitemap-0.1b2 test/setup.rb
sitemap-0.1b test/setup.rb