Commit graph

6 commits

Author SHA1 Message Date
Robert Speicher
852b9c28dd Move observer specs out of spec/models into spec/observers 2012-08-25 13:22:45 -04:00
Robert Speicher
7754189187 Fully embrace Ruby 1.9 hash syntax
Didn't bother with files in db/, config/, or features/
2012-08-10 18:25:15 -04:00
Robb Kidd
dfb5da9da3 Disable observers in specs. Enable only when observer is under test.
Used the built-in observer enable/disable feature in ActiveModel[1].
ActiveRecord::Base includes ActiveModel::Observing which provides this
behavior.

Simple wraps to enable the observer under test were added to the specs
for: ActivityObserver, IssueObserver, Admin::Users and Issues.

The spec for Project.last_activity was refactored to separate the tests
for #last_activity and #last_activity_date. Each had doubles added to
isolate the spec from the hidden dependency on the ActivityObserver
action to create an Event for the project when an Issue is created. This
ActivityObserver behavior is already tested by its spec.

[1] http://api.rubyonrails.org/classes/ActiveModel/ObserverArray.html
2012-06-20 14:09:46 -04:00
Dmitriy Zaporozhets
a9ef0bc343 test fix, css refactoring 2012-03-07 23:55:46 +02:00
Dmitriy Zaporozhets
fa07c9d662 register push event 2012-02-28 16:48:15 +02:00
Dmitriy Zaporozhets
dcdb2fdfdb Observe issue, merge request, note creation - create event 2012-02-28 16:01:14 +02:00