From 8e1b79663c1ac1a105e0e1103b4d09c0d897371d Mon Sep 17 00:00:00 2001 From: Gibheer Date: Sat, 17 Nov 2012 14:23:20 +0100 Subject: added a basic spec for the controller --- spec/unit/controller/call_spec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 spec/unit/controller/call_spec.rb diff --git a/spec/unit/controller/call_spec.rb b/spec/unit/controller/call_spec.rb new file mode 100644 index 0000000..af6f719 --- /dev/null +++ b/spec/unit/controller/call_spec.rb @@ -0,0 +1,14 @@ +require 'spec_helper' + +describe Zero::Controller, '.call' do + subject { SpecController.call(env) } + let(:env) { EnvGenerator.get('/foo') } + + it "returns a response" do + subject.should be_respond_to(:to_a) + end + + it "returns an object with the first element being a status" do + subject[0].should be_kind_of(Numeric) + end +end -- cgit v1.2.3-70-g09d2