require'spec_helper'describeGitlab::AllowabledosubjectdoClass.new.include(described_class).newenddescribe'#can?'dolet(:user){create(:user)}context'when user is allowed to do something'dolet(:project){create(:empty_project,:public)}it'reports correct ability to perform action'doexpect(subject.can?(user,:read_project,project)).tobetrueendendcontext'when user is not allowed to do something'dolet(:project){create(:empty_project,:private)}it'reports correct ability to perform action'doexpect(subject.can?(user,:read_project,project)).tobefalseendendendend