gitlabhq/spec
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
..
helpers 1/ rspec'ed 2011-12-27 00:37:27 +01:00
mailers Update Notify spec to use host set in config/gitlab.yml 2012-05-16 11:25:18 -04:00
models Disable observers in specs. Enable only when observer is under test. 2012-06-20 14:09:46 -04:00
requests Disable observers in specs. Enable only when observer is under test. 2012-06-20 14:09:46 -04:00
support Rspec test repo replaced.\nMerge Requests improved 2012-03-13 23:54:49 +02:00
workers Fix issues with push 600+ commits. refactored, improved push events 2012-04-04 07:39:04 +03:00
factories.rb use ffaker gem 2012-05-29 17:35:34 +05:00
factory.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
monkeypatch.rb [Tests] Better project coverage 2012-05-27 13:39:57 +03:00
seed_project.tar.gz Rspec test repo replaced.\nMerge Requests improved 2012-03-13 23:54:49 +02:00
spec_helper.rb Disable observers in specs. Enable only when observer is under test. 2012-06-20 14:09:46 -04:00