spec/lib/coach/middleware_spec.rb in coach-0.2.0 vs spec/lib/coach/middleware_spec.rb in coach-0.2.1
- old
+ new
@@ -3,9 +3,16 @@
describe Coach::Middleware do
let(:middleware_class) { Class.new(Coach::Middleware) }
let(:context_) { {} }
let(:middleware_obj) { middleware_class.new(context_, nil) }
+ describe ".provides" do
+ it "blows up if providing a reserved keyword" do
+ expect { middleware_class.provides(:_metadata) }.
+ to raise_exception(/cannot provide.* coach uses this/i)
+ end
+ end
+
describe ".provides?" do
context "given names it does provide" do
before { middleware_class.provides(:foo, :bar) }
it "returns true" do