Skip to content

Instantly share code, notes, and snippets.

@ethangunderson
Created January 31, 2010 07:35
Show Gist options
  • Save ethangunderson/290951 to your computer and use it in GitHub Desktop.
Save ethangunderson/290951 to your computer and use it in GitHub Desktop.
NIL_HASH = {
:datetime_start=>nil,
:datetime_end=>nil,
:run_start_time=>nil,
:run_end_time=>nil,
:result_comment=>nil,
:inprogress_state=>nil,
:inprogress_testcase=>nil,
:inprogress_lasterror=>nil
}
def reset_test_state(params_to_update)
time = Time.now
self.update_attributes(params_to_update, :datetime_add => time, :result_location => get_result_location_str(time), NIL_HASH)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment