From 6eaae965f85bf2900c07e2f76f466e0f52b46c92 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Sat, 8 Apr 2017 14:29:24 -0400 Subject: [PATCH] silence Jekyll output --- spec/jekyll_seo_tag/drop_spec.rb | 4 ++++ spec/jekyll_seo_tag/filters_spec.rb | 4 ++++ spec/jekyll_seo_tag/json_ld_spec.rb | 4 ++++ spec/jekyll_seo_tag_spec.rb | 4 +--- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/spec/jekyll_seo_tag/drop_spec.rb b/spec/jekyll_seo_tag/drop_spec.rb index 4ae3085..d9ab962 100644 --- a/spec/jekyll_seo_tag/drop_spec.rb +++ b/spec/jekyll_seo_tag/drop_spec.rb @@ -7,6 +7,10 @@ RSpec.describe Jekyll::SeoTag::Drop do let(:text) { "" } subject { described_class.new(text, context) } + before do + Jekyll.logger.log_level = :error + end + # Drop includes liquid filters which expect arguments # By default, in drops, `to_h` will call each public method with no arugments # Here, that would cause the filters to explode. This test ensures that all diff --git a/spec/jekyll_seo_tag/filters_spec.rb b/spec/jekyll_seo_tag/filters_spec.rb index c44d5cb..c3cf1c2 100644 --- a/spec/jekyll_seo_tag/filters_spec.rb +++ b/spec/jekyll_seo_tag/filters_spec.rb @@ -4,6 +4,10 @@ RSpec.describe Jekyll::SeoTag::Filters do let(:context) { make_context(:page => page, :site => site) } subject { described_class.new(context) } + before do + Jekyll.logger.log_level = :error + end + it "stores the context" do expect(subject.instance_variable_get("@context")).to be_a(Liquid::Context) end diff --git a/spec/jekyll_seo_tag/json_ld_spec.rb b/spec/jekyll_seo_tag/json_ld_spec.rb index c5f3b9b..58a6d9f 100644 --- a/spec/jekyll_seo_tag/json_ld_spec.rb +++ b/spec/jekyll_seo_tag/json_ld_spec.rb @@ -1,4 +1,8 @@ RSpec.describe Jekyll::SeoTag::JSONLD do + before do + Jekyll.logger.log_level = :error + end + let(:metadata) do { "title" => "title", diff --git a/spec/jekyll_seo_tag_spec.rb b/spec/jekyll_seo_tag_spec.rb index bcc5d76..a0f3ca8 100755 --- a/spec/jekyll_seo_tag_spec.rb +++ b/spec/jekyll_seo_tag_spec.rb @@ -1,6 +1,4 @@ -require "spec_helper" - -describe Jekyll::SeoTag do +RSpec.describe Jekyll::SeoTag do let(:page) { make_page } let(:site) { make_site } let(:post) { make_post }