diff options
author | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2015-02-12 21:17:35 +0300 |
---|---|---|
committer | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2015-02-12 21:17:35 +0300 |
commit | 0c4a70a306b871899bf87ce4673918abfee4d95f (patch) | |
tree | c7a702fb511209ffe0eceba245d1ffea71dce1aa /spec/models/members/project_member_spec.rb | |
parent | de1c450abd6b367390a1295cac402344f500d41d (diff) |
Updated rspec to rspec 3.x syntax
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
Diffstat (limited to 'spec/models/members/project_member_spec.rb')
-rw-r--r-- | spec/models/members/project_member_spec.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/spec/models/members/project_member_spec.rb b/spec/models/members/project_member_spec.rb index 9b5f89b6d7d..521721f3577 100644 --- a/spec/models/members/project_member_spec.rb +++ b/spec/models/members/project_member_spec.rb @@ -33,19 +33,19 @@ describe ProjectMember do @status = @project_2.team.import(@project_1) end - it { @status.should be_true } + it { expect(@status).to be_truthy } describe 'project 2 should get user 1 as developer. user_2 should not be changed' do - it { @project_2.users.should include(@user_1) } - it { @project_2.users.should include(@user_2) } + it { expect(@project_2.users).to include(@user_1) } + it { expect(@project_2.users).to include(@user_2) } - it { @abilities.allowed?(@user_1, :write_project, @project_2).should be_true } - it { @abilities.allowed?(@user_2, :read_project, @project_2).should be_true } + it { expect(@abilities.allowed?(@user_1, :write_project, @project_2)).to be_truthy } + it { expect(@abilities.allowed?(@user_2, :read_project, @project_2)).to be_truthy } end describe 'project 1 should not be changed' do - it { @project_1.users.should include(@user_1) } - it { @project_1.users.should_not include(@user_2) } + it { expect(@project_1.users).to include(@user_1) } + it { expect(@project_1.users).not_to include(@user_2) } end end @@ -64,12 +64,12 @@ describe ProjectMember do ) end - it { @project_1.users.should include(@user_1) } - it { @project_1.users.should include(@user_2) } + it { expect(@project_1.users).to include(@user_1) } + it { expect(@project_1.users).to include(@user_2) } - it { @project_2.users.should include(@user_1) } - it { @project_2.users.should include(@user_2) } + it { expect(@project_2.users).to include(@user_1) } + it { expect(@project_2.users).to include(@user_2) } end describe :truncate_teams do @@ -86,7 +86,7 @@ describe ProjectMember do ProjectMember.truncate_teams([@project_1.id, @project_2.id]) end - it { @project_1.users.should be_empty } - it { @project_2.users.should be_empty } + it { expect(@project_1.users).to be_empty } + it { expect(@project_2.users).to be_empty } end end |