From 1575a95b65d4cad91f775ae260b8828cdf303462 Mon Sep 17 00:00:00 2001 From: Gabriel Mazetto Date: Wed, 6 Apr 2016 20:09:15 -0300 Subject: little refactor and improvements on specs --- spec/lib/banzai/pipeline/wiki_pipeline_spec.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'spec/lib/banzai/pipeline') diff --git a/spec/lib/banzai/pipeline/wiki_pipeline_spec.rb b/spec/lib/banzai/pipeline/wiki_pipeline_spec.rb index 4f86b1d87e3..7aa1b4a3bf6 100644 --- a/spec/lib/banzai/pipeline/wiki_pipeline_spec.rb +++ b/spec/lib/banzai/pipeline/wiki_pipeline_spec.rb @@ -1,9 +1,6 @@ require 'rails_helper' describe Banzai::Pipeline::WikiPipeline do - let(:project_wiki) { double } - before(:each) { allow(project_wiki).to receive(:wiki_base_path) { '/some/repo/wikis' } } - describe 'TableOfContents' do it 'replaces the tag with the TableOfContentsFilter result' do markdown = <<-MD.strip_heredoc @@ -14,7 +11,7 @@ describe Banzai::Pipeline::WikiPipeline do Foo MD - result = described_class.call(markdown, project: spy, project_wiki: project_wiki) + result = described_class.call(markdown, project: spy, project_wiki: spy) aggregate_failures do expect(result[:output].text).not_to include '[[' @@ -32,7 +29,7 @@ describe Banzai::Pipeline::WikiPipeline do Foo MD - output = described_class.to_html(markdown, project: spy, project_wiki: project_wiki) + output = described_class.to_html(markdown, project: spy, project_wiki: spy) expect(output).to include('[[toc]]') end @@ -45,7 +42,7 @@ describe Banzai::Pipeline::WikiPipeline do Foo MD - output = described_class.to_html(markdown, project: spy, project_wiki: project_wiki) + output = described_class.to_html(markdown, project: spy, project_wiki: spy) aggregate_failures do expect(output).not_to include('