Skip to content

Commit

Permalink
Convert specs to RSpec 3.0.4 syntax with Transpec
Browse files Browse the repository at this point in the history
This conversion is done by Transpec 2.3.7 with the following command:
    transpec

* 6 conversions
    from: it { should ... }
      to: it { is_expected.to ... }

* 3 conversions
    from: == expected
      to: eq(expected)

* 1 conversion
    from: it { should_not ... }
      to: it { is_expected.not_to ... }

For more details: https://github.com/yujinakayama/transpec#supported-conversions
  • Loading branch information
nertzy committed Sep 4, 2014
1 parent 3e8b86a commit 9375d36
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions spec/integration/pg_search_spec.rb
Expand Up @@ -1012,7 +1012,7 @@ class AnotherSubclassModel < SuperclassModel
expect(PgSearch::Document).to receive(:search).with(query).and_return(relation)
end

it { should == relation }
it { is_expected.to eq(relation) }
end

context "with PgSearch.multisearch_options set to a Hash" do
Expand All @@ -1031,7 +1031,7 @@ class AnotherSubclassModel < SuperclassModel

let!(:soundalike_record) { MultisearchableModel.create!(:title => 'foning') }
let(:query) { "Phoning" }
it { should include(soundalike_record) }
it { is_expected.to include(soundalike_record) }
end

context "with PgSearch.multisearch_options set to a Proc" do
Expand Down Expand Up @@ -1064,12 +1064,12 @@ class AnotherSubclassModel < SuperclassModel

context "with soundalike true" do
let(:soundalike) { true }
it { should include(soundalike_record) }
it { is_expected.to include(soundalike_record) }
end

context "with soundalike false" do
let(:soundalike) { false }
it { should_not include(soundalike_record) }
it { is_expected.not_to include(soundalike_record) }
end
end

Expand Down
6 changes: 3 additions & 3 deletions spec/lib/pg_search/document_spec.rb
Expand Up @@ -11,7 +11,7 @@
end
end

it { should be_an(ActiveRecord::Base) }
it { is_expected.to be_an(ActiveRecord::Base) }

describe "callbacks" do
describe "before_validation" do
Expand All @@ -34,7 +34,7 @@

describe '#content' do
subject { super().content }
it { should == text }
it { is_expected.to eq(text) }
end
end

Expand All @@ -48,7 +48,7 @@

describe '#content' do
subject { super().content }
it { should == "1 2" }
it { is_expected.to eq("1 2") }
end
end
end
Expand Down

0 comments on commit 9375d36

Please sign in to comment.