From f3902f19706a5354e69e2e355b236673d3f58684 Mon Sep 17 00:00:00 2001 From: Luciano Sousa Date: Thu, 24 Sep 2015 12:24:53 -0300 Subject: [PATCH] removing rspec warnings from old syntax --- spec/models/app_spec.rb | 10 +++++----- spec/models/fabricators_spec.rb | 2 +- spec/models/fingerprint/sha1_spec.rb | 4 ++-- spec/models/issue_tracker_spec.rb | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/spec/models/app_spec.rb b/spec/models/app_spec.rb index 7420f42..b0a0291 100644 --- a/spec/models/app_spec.rb +++ b/spec/models/app_spec.rb @@ -1,10 +1,10 @@ describe App, type: 'model' do context "Attributes" do - it { should have_field(:_id).of_type(String) } - it { should have_field(:name).of_type(String) } - it { should have_fields(:api_key, :github_repo, :bitbucket_repo, :asset_host, :repository_branch) } - it { should have_fields(:resolve_errs_on_deploy, :notify_all_users, :notify_on_errs, :notify_on_deploys).of_type(Mongoid::Boolean) } - it { should have_field(:email_at_notices).of_type(Array).with_default_value_of(Errbit::Config.email_at_notices) } + it { is_expected.to have_field(:_id).of_type(String) } + it { is_expected.to have_field(:name).of_type(String) } + it { is_expected.to have_fields(:api_key, :github_repo, :bitbucket_repo, :asset_host, :repository_branch) } + it { is_expected.to have_fields(:resolve_errs_on_deploy, :notify_all_users, :notify_on_errs, :notify_on_deploys).of_type(Mongoid::Boolean) } + it { is_expected.to have_field(:email_at_notices).of_type(Array).with_default_value_of(Errbit::Config.email_at_notices) } end context 'validations' do diff --git a/spec/models/fabricators_spec.rb b/spec/models/fabricators_spec.rb index b06f091..d6f1ef1 100644 --- a/spec/models/fabricators_spec.rb +++ b/spec/models/fabricators_spec.rb @@ -10,7 +10,7 @@ describe "Fabrication" do context "Fabricate(:#{fabricator_name})" do subject { Fabricate.build(fabricator_name) } - it { should be_valid } + it { is_expected.to be_valid } end end end diff --git a/spec/models/fingerprint/sha1_spec.rb b/spec/models/fingerprint/sha1_spec.rb index 417914c..d83c264 100644 --- a/spec/models/fingerprint/sha1_spec.rb +++ b/spec/models/fingerprint/sha1_spec.rb @@ -64,7 +64,7 @@ describe Fingerprint::Sha1, type: 'model' do let(:message) { "NoMethodError: undefined method `foo' for #" } it 'removes memory address from object strings' do - should eq "NoMethodError: undefined method `foo' for #" + is_expected.to eq "NoMethodError: undefined method `foo' for #" end end @@ -72,7 +72,7 @@ describe Fingerprint::Sha1, type: 'model' do let(:message) { "# #" } it 'removes memory addresses globally' do - should eq "# #" + is_expected.to eq "# #" end end end diff --git a/spec/models/issue_tracker_spec.rb b/spec/models/issue_tracker_spec.rb index 3f56db7..299fa74 100644 --- a/spec/models/issue_tracker_spec.rb +++ b/spec/models/issue_tracker_spec.rb @@ -1,11 +1,11 @@ describe IssueTracker, type: 'model' do describe "Association" do - it { should be_embedded_in(:app) } + it { is_expected.to be_embedded_in(:app) } end describe "Attributes" do - it { should have_field(:type_tracker).of_type(String) } - it { should have_field(:options).of_type(Hash).with_default_value_of({}) } + it { is_expected.to have_field(:type_tracker).of_type(String) } + it { is_expected.to have_field(:options).of_type(Hash).with_default_value_of({}) } end describe "#tracker" do -- libgit2 0.21.2