spec/unit/application_spec.rb in restfulness-0.2.1 vs spec/unit/application_spec.rb in restfulness-0.2.2
- old
+ new
@@ -30,10 +30,11 @@
end
describe "#build_rack_app (protected)" do
it "should build a new rack app with middlewares" do
obj = klass.new
+ obj.class.middlewares << Rack::ShowExceptions
app = obj.send(:build_rack_app)
app.should be_a(Rack::Builder)
# Note, this might brake if Rack changes!
app.instance_variable_get(:@use).first.call.should be_a(klass.middlewares.first)
app.instance_variable_get(:@run).should be_a(Restfulness::Dispatchers::Rack)
@@ -63,12 +64,12 @@
end
end
describe ".middlewares" do
- it "should provide simple array of middlewares" do
+ it "should provide empty array of middlewares" do
klass.middlewares.should be_a(Array)
- klass.middlewares.should include(Rack::ShowExceptions)
+ klass.middlewares.should be_empty
end
end
describe ".logger" do
it "should return main logger" do