BigW Consortium Gitlab
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
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
admin | Loading commit data... | |
commits_notes_spec.rb | Loading commit data... | |
commits_spec.rb | Loading commit data... | |
dashboard_issues_spec.rb | Loading commit data... | |
dashboard_merge_requests_spec.rb | Loading commit data... | |
dashboard_spec.rb | Loading commit data... | |
file_blame_spec.rb | Loading commit data... | |
hooks_spec.rb | Loading commit data... | |
issues_notes_spec.rb | Loading commit data... | |
issues_spec.rb | Loading commit data... | |
keys_spec.rb | Loading commit data... | |
last_push_widget_spec.rb | Loading commit data... | |
merge_requests_spec.rb | Loading commit data... | |
milestones_spec.rb | Loading commit data... | |
profile_spec.rb | Loading commit data... | |
projects_deploy_keys_spec.rb | Loading commit data... | |
projects_security_spec.rb | Loading commit data... | |
projects_spec.rb | Loading commit data... | |
projects_tree_spec.rb | Loading commit data... | |
projects_wall_spec.rb | Loading commit data... | |
repositories_spec.rb | Loading commit data... | |
search_spec.rb | Loading commit data... | |
snippets_spec.rb | Loading commit data... | |
team_members_spec.rb | Loading commit data... | |
user_security_spec.rb | Loading commit data... | |
wikis_spec.rb | Loading commit data... |