diff --git a/spec/models/solidus_content/entry_spec.rb b/spec/models/solidus_content/entry_spec.rb index 54bb0db..4f5d7b1 100644 --- a/spec/models/solidus_content/entry_spec.rb +++ b/spec/models/solidus_content/entry_spec.rb @@ -83,7 +83,7 @@ end specify "#data" do - expect(entry.entry_type) + allow(entry.entry_type) .to receive(:content_for).with(entry).and_return(data: :foo) expect(entry.data).to eq(:foo) @@ -92,7 +92,7 @@ specify "#content" do content = instance_double(Hash) - expect(entry.entry_type) + allow(entry.entry_type) .to receive(:content_for).with(entry).and_return(content) expect(entry.content).to eq(content) diff --git a/spec/models/solidus_content/entry_type_spec.rb b/spec/models/solidus_content/entry_type_spec.rb index f329f49..49641cd 100644 --- a/spec/models/solidus_content/entry_type_spec.rb +++ b/spec/models/solidus_content/entry_type_spec.rb @@ -15,7 +15,7 @@ shared_examples 'a content provider' do it 'calls the content-provider call method' do - expect( + allow( SolidusContent.config.providers[provider_name.to_sym] ).to receive(:call).with( slug: entry.slug, diff --git a/spec/solidus_content/providers/contentful_spec.rb b/spec/solidus_content/providers/contentful_spec.rb index b7658fc..8d9eda8 100644 --- a/spec/solidus_content/providers/contentful_spec.rb +++ b/spec/solidus_content/providers/contentful_spec.rb @@ -43,12 +43,12 @@ end it 'returns data using Contentful client' do - expect(Contentful::Client) + allow(Contentful::Client) .to receive(:new) .with(space: contentful_space_id, access_token: contentful_access_token) .and_return(contentful) - expect(contentful).to receive(:entry).with(entry_id).and_return(entry) + allow(contentful).to receive(:entry).with(entry_id).and_return(entry) expect(subject[:data]).to eq(data) end diff --git a/spec/solidus_content/providers/dato_cms_spec.rb b/spec/solidus_content/providers/dato_cms_spec.rb index 2aeeb73..4ae9c5c 100644 --- a/spec/solidus_content/providers/dato_cms_spec.rb +++ b/spec/solidus_content/providers/dato_cms_spec.rb @@ -54,12 +54,12 @@ end it 'returns data using DatoCMS client' do - expect(Dato::Site::Client) + allow(Dato::Site::Client) .to receive(:new) .with(api_token, environment: environment) .and_return(dato) - expect(repo).to receive(:find).with(item_id, version: version).and_return(fields) + allow(repo).to receive(:find).with(item_id, version: version).and_return(fields) expect(subject[:data]).to eq(fields) end diff --git a/spec/solidus_content/providers/prismic_spec.rb b/spec/solidus_content/providers/prismic_spec.rb index 27e0bce..b3080d5 100644 --- a/spec/solidus_content/providers/prismic_spec.rb +++ b/spec/solidus_content/providers/prismic_spec.rb @@ -49,12 +49,12 @@ end it 'returns data using Prismic client' do - expect(::Prismic) + allow(::Prismic) .to receive(:api) .with(api_entry_point, api_token) .and_return(prismic) - expect(prismic).to receive(:getByID).with(id).and_return(entry) + allow(prismic).to receive(:getByID).with(id).and_return(entry) expect(subject[:data]).to eq(data) end @@ -68,12 +68,12 @@ end it 'returns data using Prismic client' do - expect(::Prismic) + allow(::Prismic) .to receive(:api) .with(api_entry_point, nil) .and_return(prismic) - expect(prismic).to receive(:getByID).with(id).and_return(entry) + allow(prismic).to receive(:getByID).with(id).and_return(entry) expect(subject[:data]).to eq(data) end