spec/plugin/default_headers_spec.rb in roda-3.17.0 vs spec/plugin/default_headers_spec.rb in roda-3.18.0
- old
+ new
@@ -70,6 +70,13 @@
@app = Class.new(@app)
req[1].must_equal h
end
+
+ it "should offer default_headers method on class and response instance" do
+ h = {'Content-Type'=>'text/json', 'Foo'=>'bar'}
+ app.plugin :default_headers, h
+ app.default_headers.must_equal h
+ app::RodaResponse.new.default_headers.must_equal h
+ end
end