Commit 8cf20c3e4b612b23f643d9c3517e635f4636fb3c
Exists in
master
and in
1 other branch
Merge pull request #952 from lucianosousa/enhancement/rspec-warnings
removing rspec warnings from old syntax
Showing
4 changed files
with
11 additions
and
11 deletions
Show diff stats
spec/models/app_spec.rb
1 | describe App, type: 'model' do | 1 | describe App, type: 'model' do |
2 | context "Attributes" do | 2 | context "Attributes" do |
3 | - it { should have_field(:_id).of_type(String) } | ||
4 | - it { should have_field(:name).of_type(String) } | ||
5 | - it { should have_fields(:api_key, :github_repo, :bitbucket_repo, :asset_host, :repository_branch) } | ||
6 | - it { should have_fields(:resolve_errs_on_deploy, :notify_all_users, :notify_on_errs, :notify_on_deploys).of_type(Mongoid::Boolean) } | ||
7 | - it { should have_field(:email_at_notices).of_type(Array).with_default_value_of(Errbit::Config.email_at_notices) } | 3 | + it { is_expected.to have_field(:_id).of_type(String) } |
4 | + it { is_expected.to have_field(:name).of_type(String) } | ||
5 | + it { is_expected.to have_fields(:api_key, :github_repo, :bitbucket_repo, :asset_host, :repository_branch) } | ||
6 | + it { is_expected.to have_fields(:resolve_errs_on_deploy, :notify_all_users, :notify_on_errs, :notify_on_deploys).of_type(Mongoid::Boolean) } | ||
7 | + it { is_expected.to have_field(:email_at_notices).of_type(Array).with_default_value_of(Errbit::Config.email_at_notices) } | ||
8 | end | 8 | end |
9 | 9 | ||
10 | context 'validations' do | 10 | context 'validations' do |
spec/models/fabricators_spec.rb
@@ -10,7 +10,7 @@ describe "Fabrication" do | @@ -10,7 +10,7 @@ describe "Fabrication" do | ||
10 | context "Fabricate(:#{fabricator_name})" do | 10 | context "Fabricate(:#{fabricator_name})" do |
11 | subject { Fabricate.build(fabricator_name) } | 11 | subject { Fabricate.build(fabricator_name) } |
12 | 12 | ||
13 | - it { should be_valid } | 13 | + it { is_expected.to be_valid } |
14 | end | 14 | end |
15 | end | 15 | end |
16 | end | 16 | end |
spec/models/fingerprint/sha1_spec.rb
@@ -64,7 +64,7 @@ describe Fingerprint::Sha1, type: 'model' do | @@ -64,7 +64,7 @@ describe Fingerprint::Sha1, type: 'model' do | ||
64 | let(:message) { "NoMethodError: undefined method `foo' for #<ActiveSupport::HashWithIndifferentAccess:0x007f6bfe3287e8>" } | 64 | let(:message) { "NoMethodError: undefined method `foo' for #<ActiveSupport::HashWithIndifferentAccess:0x007f6bfe3287e8>" } |
65 | 65 | ||
66 | it 'removes memory address from object strings' do | 66 | it 'removes memory address from object strings' do |
67 | - should eq "NoMethodError: undefined method `foo' for #<ActiveSupport::HashWithIndifferentAccess>" | 67 | + is_expected.to eq "NoMethodError: undefined method `foo' for #<ActiveSupport::HashWithIndifferentAccess>" |
68 | end | 68 | end |
69 | end | 69 | end |
70 | 70 | ||
@@ -72,7 +72,7 @@ describe Fingerprint::Sha1, type: 'model' do | @@ -72,7 +72,7 @@ describe Fingerprint::Sha1, type: 'model' do | ||
72 | let(:message) { "#<ActiveSupport::HashWithIndifferentAccess:0x007f6bfe3287e8> #<Object:0x007fa2b33d9458>" } | 72 | let(:message) { "#<ActiveSupport::HashWithIndifferentAccess:0x007f6bfe3287e8> #<Object:0x007fa2b33d9458>" } |
73 | 73 | ||
74 | it 'removes memory addresses globally' do | 74 | it 'removes memory addresses globally' do |
75 | - should eq "#<ActiveSupport::HashWithIndifferentAccess> #<Object>" | 75 | + is_expected.to eq "#<ActiveSupport::HashWithIndifferentAccess> #<Object>" |
76 | end | 76 | end |
77 | end | 77 | end |
78 | end | 78 | end |
spec/models/issue_tracker_spec.rb
1 | describe IssueTracker, type: 'model' do | 1 | describe IssueTracker, type: 'model' do |
2 | describe "Association" do | 2 | describe "Association" do |
3 | - it { should be_embedded_in(:app) } | 3 | + it { is_expected.to be_embedded_in(:app) } |
4 | end | 4 | end |
5 | 5 | ||
6 | describe "Attributes" do | 6 | describe "Attributes" do |
7 | - it { should have_field(:type_tracker).of_type(String) } | ||
8 | - it { should have_field(:options).of_type(Hash).with_default_value_of({}) } | 7 | + it { is_expected.to have_field(:type_tracker).of_type(String) } |
8 | + it { is_expected.to have_field(:options).of_type(Hash).with_default_value_of({}) } | ||
9 | end | 9 | end |
10 | 10 | ||
11 | describe "#tracker" do | 11 | describe "#tracker" do |