fix all the specs but one
Didier Lafforgue
committed Apr 28, 2018
commit 7ef82fe199461588d8639b0d298041f50536bb43
Showing 5
changed files with
11 additions
and 10 deletions
spec/integration/repositories/page_repository_spec.rb
+1
-1
| @@ | @@ -14,7 +14,7 @@ describe Locomotive::Steam::PageRepository do |
| describe '#all' do | |
| let(:conditions) { {} } | |
| subject { repository.all(conditions) } | |
| - | it { expect(subject.size).to eq 34 } |
| + | it { expect(subject.size).to eq 35 } |
| context 'with conditions' do | |
| let(:conditions) { { fullpath: 'index', 'slug.ne' => '404' } } | |
spec/integration/server/sitemap_spec.rb
+1
-1
| @@ | @@ -21,7 +21,7 @@ describe Locomotive::Steam::Server do |
| it 'checks if it looks valid' do | |
| expect(Nokogiri::XML(subject).errors.empty?).to eq true | |
| - | expect(subject.scan(/<url>/).size).to eq 25 |
| + | expect(subject.scan(/<url>/).size).to eq 26 |
| expect(subject).to match("<loc>http://example.org/songs/song-number-2/band</loc>") | |
| expect(subject).to match((<<-EOF | |
| <url> | |
spec/unit/adapters/filesystem/yaml_loaders/page_spec.rb
+1
-1
| @@ | @@ -15,7 +15,7 @@ describe Locomotive::Steam::Adapters::Filesystem::YAMLLoaders::Page do |
| subject { loader.load(scope).sort { |a, b| a[:_fullpath] <=> b[:_fullpath] } } | |
| it 'tests various stuff' do | |
| - | expect(subject.size).to eq 34 |
| + | expect(subject.size).to eq 35 |
| expect(subject.first[:title]).to eq(en: 'Page not found', fr: 'Page non trouvée') | |
| expect(subject[23][:is_layout]).to eq true | |
| expect(subject[23][:listed]).to eq false | |
spec/unit/adapters/filesystem/yaml_loaders/section_spec.rb
+1
-1
| @@ | @@ -10,7 +10,7 @@ describe Locomotive::Steam::Adapters::Filesystem::YAMLLoaders::Section do |
| describe '#load' do | |
| - | let(:scope) { instance_double('Scope') } |
| + | let(:scope) { instance_double('Scope', default_locale: :en) } |
| subject { loader.load(scope).sort { |a, b| a[:name] <=> b[:name] } } | |
spec/unit/services/section_finder_service_spec.rb
+7
-6
| @@ | @@ -2,12 +2,12 @@ require 'spec_helper' |
| describe Locomotive::Steam::SectionFinderService do | |
| - | let(:repository) { instance_double('SectionRepository') } |
| - | let(:site) { instance_double('Site', _id: 1, default_locale: :en, locales: [:en, :fr]) |
| - | let(:section) { instance_double('Section') } |
| - | let(:slug) { 'header' } |
| + | let(:repository) { instance_double('SectionRepository') } |
| + | let(:site) { instance_double('Site', _id: 1, default_locale: :en, locales: [:en, :fr]) } |
| + | let(:section) { instance_double('Section') } |
| + | let(:slug) { 'header' } |
| - | let(:finder) { described_class.new repository } |
| + | let(:finder) { described_class.new(repository) } |
| before do | |
| allow(repository).to receive(:by_slug).and_return(section) | |
| @@ | @@ -20,8 +20,9 @@ describe Locomotive::Steam::SectionFinderService do |
| subject { finder.find(slug) } | |
| - | it { is_expected.to respond_with section } |
| + | it { is_expected.to eq(section) } |
| end | |
| + | |
| end | |