diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-03 00:01:08 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-03 00:01:08 +0200 |
commit | 40a956eb6825f2bbca06e9f24c1fb24dc71a1ecd (patch) | |
tree | 0b390d11b67df0b1df4fc4376ff3c9c75ddd45af | |
parent | cac7723451e575ce39a6930990178450a2a972f0 (diff) | |
download | gitlab-ce-40a956eb6825f2bbca06e9f24c1fb24dc71a1ecd.tar.gz |
Few more fixes after removing roles
-rw-r--r-- | app/models/event.rb | 3 | ||||
-rw-r--r-- | app/models/merge_request.rb | 2 | ||||
-rw-r--r-- | spec/models/project_spec.rb | 8 | ||||
-rw-r--r-- | spec/models/user_spec.rb | 4 | ||||
-rw-r--r-- | spec/support/stubbed_repository.rb | 4 |
5 files changed, 2 insertions, 19 deletions
diff --git a/app/models/event.rb b/app/models/event.rb index eb88a4ed33a..95075ffae71 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -15,9 +15,6 @@ # class Event < ActiveRecord::Base - include NoteEvent - include PushEvent - attr_accessible :project, :action, :data, :author_id, :project_id, :target_id, :target_type diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 052e0850d96..68211acc0c2 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -20,7 +20,7 @@ # require Rails.root.join("app/models/commit") -require Rails.root.join("app/roles/static_model") +require Rails.root.join("lib/static_model") class MergeRequest < ActiveRecord::Base include IssueCommonality diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 27e68ce10ef..ea1efbbec78 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -133,14 +133,6 @@ describe Project do it { should respond_to(:path_with_namespace) } end - describe 'modules' do - it { should include_module(Repository) } - it { should include_module(PushObserver) } - it { should include_module(Authority) } - it { should include_module(Team) } - it { should include_module(NamespacedProject) } - end - it "should return valid url to repo" do project = Project.new(path: "somewhere") project.url_to_repo.should == Gitlab.config.gitolite.ssh_path_prefix + "somewhere.git" diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 5f6244ec5dd..51774e4c74d 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -65,10 +65,6 @@ describe User do it { should ensure_length_of(:bio).is_within(0..255) } end - describe 'modules' do - it { should include_module(Account) } - end - describe "Respond to" do it { should respond_to(:is_admin?) } it { should respond_to(:identifier) } diff --git a/spec/support/stubbed_repository.rb b/spec/support/stubbed_repository.rb index 5bf3ea46099..ad88dd77a4f 100644 --- a/spec/support/stubbed_repository.rb +++ b/spec/support/stubbed_repository.rb @@ -1,6 +1,6 @@ # Stubs out all Git repository access done by models so that specs can run # against fake repositories without Grit complaining that they don't exist. -module StubbedRepository +class Project def path_to_repo if new_record? || path == 'newproject' # There are a couple Project specs and features that expect the Project's @@ -27,5 +27,3 @@ module StubbedRepository end end end - -Project.send(:include, StubbedRepository) |