spec/spec_helper.rb in reservation-0.0.1 vs spec/spec_helper.rb in reservation-0.0.2
- old
+ new
@@ -25,10 +25,14 @@
end
def time t
Time.parse t
end
+
+ def make_interval start, finish
+ Reservation::Schedule::Interval.from start, finish
+ end
end
RSpec::Core::ExampleGroup.send :include, Helper
File.delete File.dirname(__FILE__) + '/dummy/db/test.sqlite3'
@@ -37,6 +41,15 @@
ActiveRecord::Base.silence do
ActiveRecord::Migration.verbose = false
load(File.dirname(__FILE__) + '/dummy/db/schema.rb')
end
+class Time
+ def pretty
+ self.strftime("%Y%m%dT%H%M")
+ end
+
+ def prettyd
+ self.strftime("%a,%Y%m%dT%H%M")
+ end
+end