summaryrefslogtreecommitdiff
path: root/spec/models/mail_service_spec.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-08-30 19:10:53 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-08-30 19:12:55 -0400
commit77053a6c217e06770a348ac989992afbd41697f6 (patch)
tree11df50675162be2045777c1f59c312d359e0d6cf /spec/models/mail_service_spec.rb
parent74b995d17b095e326177e7c0e452f0df3a1ab885 (diff)
downloadgitlab-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/mail_service_spec.rb')
-rw-r--r--spec/models/mail_service_spec.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/models/mail_service_spec.rb b/spec/models/mail_service_spec.rb
index 3fccc63..27803aa 100644
--- a/spec/models/mail_service_spec.rb
+++ b/spec/models/mail_service_spec.rb
@@ -16,7 +16,7 @@ require 'spec_helper'
describe MailService do
describe "Associations" do
- it { should belong_to :project }
+ it { is_expected.to belong_to :project }
end
describe "Validations" do
@@ -45,8 +45,8 @@ describe MailService do
end
def should_email(email)
- Notify.should_receive(:build_fail_email).with(build.id, email)
- Notify.should_not_receive(:build_success_email).with(build.id, email)
+ expect(Notify).to receive(:build_fail_email).with(build.id, email)
+ expect(Notify).not_to receive(:build_success_email).with(build.id, email)
end
end
@@ -65,8 +65,8 @@ describe MailService do
end
def should_email(email)
- Notify.should_receive(:build_success_email).with(build.id, email)
- Notify.should_not_receive(:build_fail_email).with(build.id, email)
+ expect(Notify).to receive(:build_success_email).with(build.id, email)
+ expect(Notify).not_to receive(:build_fail_email).with(build.id, email)
end
end
@@ -91,8 +91,8 @@ describe MailService do
end
def should_email(email)
- Notify.should_receive(:build_success_email).with(build.id, email)
- Notify.should_not_receive(:build_fail_email).with(build.id, email)
+ expect(Notify).to receive(:build_success_email).with(build.id, email)
+ expect(Notify).not_to receive(:build_fail_email).with(build.id, email)
end
end
@@ -117,8 +117,8 @@ describe MailService do
end
def should_email(email)
- Notify.should_not_receive(:build_success_email).with(build.id, email)
- Notify.should_not_receive(:build_fail_email).with(build.id, email)
+ expect(Notify).not_to receive(:build_success_email).with(build.id, email)
+ expect(Notify).not_to receive(:build_fail_email).with(build.id, email)
end
end
@@ -138,7 +138,7 @@ describe MailService do
end
it do
- mail.can_test?.should eq true
+ expect(mail.can_test?).to eq true
end
end
@@ -164,8 +164,8 @@ describe MailService do
end
def should_email(email)
- Notify.should_not_receive(:build_success_email).with(build.id, email)
- Notify.should_not_receive(:build_fail_email).with(build.id, email)
+ expect(Notify).not_to receive(:build_success_email).with(build.id, email)
+ expect(Notify).not_to receive(:build_fail_email).with(build.id, email)
end
end
end