Sha256: dee7defedb3eb444af1d03b02a046e3908d28eee9c5da45742d71503da28f5da

Contents?: true

Size: 939 Bytes

Versions: 20

Compression:

Stored size: 939 Bytes

Contents

require 'rubygems'
require 'test/unit'
require 'shoulda'

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))

require 'active_record'
require 'action_controller'
require 'active_record/fixtures'
require 'active_support'
require 'action_pack'
require 'action_view'
require 'rails/init'
require 'action_view/test_case'

require 'google_otg'

class Test::Unit::TestCase
end

ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :dbfile => ":memory:")

ActiveRecord::Schema.define(:version => 1) do
  create_table :hits do |t|
    t.integer :count
    t.datetime :created_at
  end
end

class Hit < ActiveRecord::Base
    validates_presence_of :count
end

(1..3).each{|idx| 
    ca = (3 - idx).hours.ago
    range = GoogleOtg::DEFAULT_RANGE
    ca = Time.at((ca.to_i/(60*range))*(60*range))

    Hit.create(:count => rand(65535), :created_at => ca)
}

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
esilverberg-google_otg-1.0.0 test/test_helper.rb
esilverberg-google_otg-1.0.1 test/test_helper.rb
esilverberg-google_otg-1.0.2 test/test_helper.rb
esilverberg-google_otg-1.0.4 test/test_helper.rb
esilverberg-google_otg-1.0.5 test/test_helper.rb
google_otg-1.1.3 test/test_helper.rb
google_otg-1.1.2 test/test_helper.rb
google_otg-1.1.1 test/test_helper.rb
google_otg-1.1.0 test/test_helper.rb
google_otg-1.0.19 test/test_helper.rb
google_otg-1.0.18 test/test_helper.rb
google_otg-1.0.17 test/test_helper.rb
google_otg-1.0.16 test/test_helper.rb
google_otg-1.0.15 test/test_helper.rb
google_otg-1.0.14 test/test_helper.rb
google_otg-1.0.13 test/test_helper.rb
google_otg-1.0.12 test/test_helper.rb
google_otg-1.0.11 test/test_helper.rb
google_otg-1.0.10 test/test_helper.rb
google_otg-1.0.9 test/test_helper.rb