File tree Expand file tree Collapse file tree
test/activerecord_provider/helpers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11require 'active_record'
2+
23module OAI ::Provider
34 # = OAI::Provider::ActiveRecordWrapper
45 #
@@ -141,7 +142,7 @@ def sql_conditions(opts)
141142 if opts . has_key? ( :until )
142143 # Handle databases which store fractions of a second by rounding up
143144 sql << "#{ timestamp_field } < :until"
144- esc_values [ :until ] = parse_to_local ( opts [ :until ] ) { |t | round_up ( t ) }
145+ esc_values [ :until ] = parse_to_local ( opts [ :until ] ) { |t | t . succ }
145146 end
146147 if opts . has_key? ( :set )
147148 sql << "set = :set"
@@ -155,11 +156,7 @@ def sql_conditions(opts)
155156 def parse_to_local ( time )
156157 time_obj = Time . parse ( time . to_s )
157158 time_obj = yield ( time_obj ) if block_given?
158- time_obj . localtime . to_s
159- end
160-
161- def round_up ( time )
162- ( time + 1 ) . round ( 0 )
159+ time_obj . localtime . strftime ( "%Y-%m-%d %H:%M:%S" )
163160 end
164161
165162 end
Original file line number Diff line number Diff line change 11class TransactionalTestCase < Test ::Unit ::TestCase
22
33 def run ( result , &block )
4+ # Handle the default "you have no tests" test if it turns up
5+ return if @method_name . to_s == "default_test"
46 ActiveRecord ::Base . transaction do
57 load_fixtures
68 result = super ( result , &block )
You can’t perform that action at this time.
0 commit comments