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 | 1 | describe App, type: 'model' do |
2 | 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 | 8 | end |
9 | 9 | |
10 | 10 | context 'validations' do | ... | ... |
spec/models/fabricators_spec.rb
spec/models/fingerprint/sha1_spec.rb
... | ... | @@ -64,7 +64,7 @@ describe Fingerprint::Sha1, type: 'model' do |
64 | 64 | let(:message) { "NoMethodError: undefined method `foo' for #<ActiveSupport::HashWithIndifferentAccess:0x007f6bfe3287e8>" } |
65 | 65 | |
66 | 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 | 68 | end |
69 | 69 | end |
70 | 70 | |
... | ... | @@ -72,7 +72,7 @@ describe Fingerprint::Sha1, type: 'model' do |
72 | 72 | let(:message) { "#<ActiveSupport::HashWithIndifferentAccess:0x007f6bfe3287e8> #<Object:0x007fa2b33d9458>" } |
73 | 73 | |
74 | 74 | it 'removes memory addresses globally' do |
75 | - should eq "#<ActiveSupport::HashWithIndifferentAccess> #<Object>" | |
75 | + is_expected.to eq "#<ActiveSupport::HashWithIndifferentAccess> #<Object>" | |
76 | 76 | end |
77 | 77 | end |
78 | 78 | end | ... | ... |
spec/models/issue_tracker_spec.rb
1 | 1 | describe IssueTracker, type: 'model' do |
2 | 2 | describe "Association" do |
3 | - it { should be_embedded_in(:app) } | |
3 | + it { is_expected.to be_embedded_in(:app) } | |
4 | 4 | end |
5 | 5 | |
6 | 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 | 9 | end |
10 | 10 | |
11 | 11 | describe "#tracker" do | ... | ... |