gitlabhq/spec/requests/admin
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
..
admin_projects_spec.rb Add resque_spec to test queuing mail. 2012-06-20 14:09:46 -04:00
admin_users_spec.rb Disable observers in specs. Enable only when observer is under test. 2012-06-20 14:09:46 -04:00
security_spec.rb Admin area improved 2012-02-11 19:56:18 +02:00