diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-08-30 19:10:53 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-08-30 19:12:55 -0400 |
commit | 77053a6c217e06770a348ac989992afbd41697f6 (patch) | |
tree | 11df50675162be2045777c1f59c312d359e0d6cf /spec/models/user_spec.rb | |
parent | 74b995d17b095e326177e7c0e452f0df3a1ab885 (diff) | |
download | gitlab-ci-rs-rspec3.tar.gz |
Convert to RSpec3 syntax via transpecrs-rspec3
Command:
transpec -c 'bundle exec rspec spec -t ~feature' \
-o should,oneliner,should_receive
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r-- | spec/models/user_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 9989e3d..affd2cb 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -42,13 +42,13 @@ describe User do it "returns false for reporter" do allow(@user).to receive(:project_info).and_return(project_with_reporter_access) - @user.has_developer_access?(1).should be_falsey + expect(@user.has_developer_access?(1)).to be_falsey end it "returns true for owner" do allow(@user).to receive(:project_info).and_return(project_with_owner_access) - @user.has_developer_access?(1).should be_truthy + expect(@user.has_developer_access?(1)).to be_truthy end end @@ -66,13 +66,13 @@ describe User do it "returns projects" do allow_any_instance_of(described_class).to receive(:can_manage_project?).and_return(true) - user.authorized_projects.count.should eq 2 + expect(user.authorized_projects.count).to eq 2 end it "empty list if user miss manage permission" do allow_any_instance_of(described_class).to receive(:can_manage_project?).and_return(false) - user.authorized_projects.count.should eq 0 + expect(user.authorized_projects.count).to eq 0 end end @@ -93,8 +93,8 @@ describe User do project.runners << runner project1.runners << runner1 - user.authorized_runners.should include(runner, runner1) - user.authorized_runners.should_not include(runner2) + expect(user.authorized_runners).to include(runner, runner1) + expect(user.authorized_runners).not_to include(runner2) end end end |