some cleanup

This commit is contained in:
2010-08-11 18:13:07 +03:00
parent e52d94846c
commit 776477b5dc
3 changed files with 29 additions and 37 deletions

View File

@@ -1,27 +1,3 @@
class Time
include Redistat::DateHelper
end

View File

@@ -26,14 +26,17 @@ module Redistat
def to_t
::Time.local(@year, @month, @day, @hour, @min, @sec, @usec)
end
alias :to_time :to_t
def to_d
::Date.civil(@year, @month, @day)
end
alias :to_date :to_d
def to_i
to_time.to_i
end
alias :to_integer :to_i
def to_s(depth = nil)
depth ||= :sec
@@ -49,12 +52,7 @@ module Redistat
end
output
end
alias :to_time :to_t
alias :to_date :to_d
alias :to_integer :to_i
alias :to_string :to_s
alias :to_string :to_s
private

View File

@@ -1,6 +1,7 @@
require "spec_helper"
describe Redistat::Summary do
include Redistat::Database
before(:each) do
db.flushdb
@@ -45,10 +46,27 @@ describe Redistat::Summary do
end
end
it "should fetch summary collections for date ranges"
def db
Redistat.redis
end
end
end