Permalink
Browse files

Default db to sqlite, not sqlite3

  • Loading branch information...
1 parent 13a5492 commit 7c86795a863e4e259028453d024424775e65b9e1 @radar committed Feb 19, 2012
Showing with 4 additions and 3 deletions.
  1. +3 −1 lib/by_star/by_year.rb
  2. +1 −2 spec/spec_helper.rb
View
4 lib/by_star/by_year.rb
@@ -30,9 +30,11 @@ def by_year(*args)
private
- def by_year_Time(time, options={})
+ def by_year_Time_or_Date(time, options={})
between(time.beginning_of_year, time.end_of_year, options)
end
+ alias_method :by_year_Time, :by_year_Time_or_Date
+ alias_method :by_year_Date, :by_year_Time_or_Date
def by_year_String_or_Fixnum(year, options={})
by_year_Time("#{year.to_s}-01-01".to_time, options)
View
3 spec/spec_helper.rb
@@ -20,8 +20,7 @@
ActiveRecord::Base.default_timezone = :utc
ActiveRecord::Base.configurations = YAML::load_file(File.dirname(__FILE__) + "/database.yml")
-
-ActiveRecord::Base.establish_connection(ENV["DB"] || "sqlite3")
+ActiveRecord::Base.establish_connection(ENV["DB"] || "sqlite")
load File.dirname(__FILE__) + "/fixtures/schema.rb"
# Freeze time to Jan 1st of this year

0 comments on commit 7c86795

Please sign in to comment.