tomykaira/clockwork — pull request #95 by robisenberg (2014-04-19 16:23:38+00:00)
Title: Bugfix: database sync task won't be updated if 'at' changes in database

Fixes issue raised by @Andyvanee's comments at end of #93.

## Changes

* split `#test_edited_tasks_switch_to_new_settings` into 3 individual
methods to check that `name`, `frequency` and `at` changes for task in
database each lead to clockwork event for task being updated.

* modify `ManagerWithDatabaseTasks#db_task_has_changed` to check if
task's `at` value has changed

* override `At` in `ManagerWithDatabaseTasks` to add `attr_reader`s
for `min`, `hour` and `wday`, and give it custom equality (`==`) when each
of these three instance variables match. This was needed so we can
compare `At.parse([new_at_value])` with the event's existing `@at`
value