Rspec models Milestone, Commit, UsersProject

This commit is contained in:
Dmitriy Zaporozhets 2013-01-03 19:11:14 +02:00
parent 2095780f24
commit e6c0673ef1
5 changed files with 157 additions and 1 deletions

View file

@ -11,7 +11,7 @@ class Commit
attr_accessor :commit, :head, :refs
delegate :message, :authored_date, :committed_date, :parents, :sha,
:date, :committer, :author, :message, :diffs, :tree, :id,
:date, :committer, :author, :diffs, :tree, :id,
:to_patch, to: :commit
class << self

View file

@ -35,6 +35,10 @@ class UsersProject < ActiveRecord::Base
delegate :name, :email, to: :user, prefix: true
scope :guests, where(project_access: GUEST)
scope :reporters, where(project_access: REPORTER)
scope :developers, where(project_access: DEVELOPER)
scope :masters, where(project_access: MASTER)
scope :in_project, ->(project) { where(project_id: project.id) }
class << self