parent
b9004780b8
commit
d916622b07
@ -0,0 +1,51 @@
|
|||||||
|
From df93a5a78dd555e933396a5fc7f74e81e97d7cb5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jun Aruga <jaruga@redhat.com>
|
||||||
|
Date: Mon, 6 Feb 2017 21:25:10 +0100
|
||||||
|
Subject: [PATCH] RSpec 3 compatibility.
|
||||||
|
|
||||||
|
---
|
||||||
|
spec/protection_spec.rb | 6 +++---
|
||||||
|
spec/spec_helper.rb | 2 +-
|
||||||
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/spec/protection_spec.rb b/spec/protection_spec.rb
|
||||||
|
index 083670c..c15a544 100755
|
||||||
|
--- a/spec/protection_spec.rb
|
||||||
|
+++ b/spec/protection_spec.rb
|
||||||
|
@@ -68,17 +68,17 @@ describe Rack::Protection do
|
||||||
|
describe "#html?" do
|
||||||
|
context "given an appropriate content-type header" do
|
||||||
|
subject { Rack::Protection::Base.new(nil).html? 'content-type' => "text/html" }
|
||||||
|
- it { should be_true }
|
||||||
|
+ it { should be_truthy }
|
||||||
|
end
|
||||||
|
|
||||||
|
context "given an inappropriate content-type header" do
|
||||||
|
subject { Rack::Protection::Base.new(nil).html? 'content-type' => "image/gif" }
|
||||||
|
- it { should be_false }
|
||||||
|
+ it { should be_falsey }
|
||||||
|
end
|
||||||
|
|
||||||
|
context "given no content-type header" do
|
||||||
|
subject { Rack::Protection::Base.new(nil).html?({}) }
|
||||||
|
- it { should be_false }
|
||||||
|
+ it { should be_falsey }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
|
||||||
|
index 6a3a8f8..5caccd8 100644
|
||||||
|
--- a/spec/spec_helper.rb
|
||||||
|
+++ b/spec/spec_helper.rb
|
||||||
|
@@ -93,7 +93,7 @@ module NotImplementedAsPending
|
||||||
|
end
|
||||||
|
|
||||||
|
RSpec.configure do |config|
|
||||||
|
- config.expect_with :rspec, :stdlib
|
||||||
|
+ config.expect_with :rspec
|
||||||
|
config.include Rack::Test::Methods
|
||||||
|
config.include TestHelpers
|
||||||
|
end
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
Loading…
Reference in new issue