gitlabhq/spec/models
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
..
activity_observer_spec.rb Disable observers in specs. Enable only when observer is under test. 2012-06-20 14:09:46 -04:00
event_spec.rb fixed project spec 2012-04-02 08:50:37 +03:00
issue_observer_spec.rb Disable observers in specs. Enable only when observer is under test. 2012-06-20 14:09:46 -04:00
issue_spec.rb Make IssueObserver handle issus, not MailerObserver 2012-06-20 14:09:46 -04:00
key_spec.rb Merge branch 'deploy_keys_nonunique' of https://github.com/miks/gitlabhq into miks-deploy_keys_nonunique 2012-03-01 16:00:14 +01:00
merge_request_spec.rb Added 'x notes' and +1 counters to issues and merge requests. Refs #549 2012-03-15 00:51:03 +02:00
milestone_spec.rb first pack of tests for milestones 2012-04-09 01:01:42 +03:00
note_spec.rb Add method to Note to create notes about status changes. 2012-06-20 14:09:46 -04:00
project_hooks_spec.rb Fix issues with push 600+ commits. refactored, improved push events 2012-04-04 07:39:04 +03:00
project_security_spec.rb 4 roles permission system 2012-02-16 09:03:55 +02:00
project_spec.rb Disable observers in specs. Enable only when observer is under test. 2012-06-20 14:09:46 -04:00
protected_branch_spec.rb lib/ refactoring. Module Gitlabhq renamed to Gitlab 2012-05-26 13:37:49 +03:00
snippet_spec.rb test expired snippets 2011-10-28 00:25:50 +05:00
user_spec.rb cleanup User model 2012-05-29 17:13:41 +05:00
users_project_spec.rb Event entity created 2012-02-28 15:09:23 +02:00
web_hook_spec.rb fix bug #322 2012-01-03 23:39:03 +02:00
wiki_spec.rb Event & Wiki models specs 2012-03-28 22:53:45 +03:00