Permalink
Browse files

Completing server initialization test TODO.

  • Loading branch information...
1 parent 348d1fc commit e41d5282394af1fe918bcf683f09ce3a842c975e @harigopal committed Feb 17, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 spec/rack_application_spec.rb
@@ -1,13 +1,14 @@
require_relative 'spec_helper'
describe JsonRpc::RackApplication do
- # TODO: The following test doesn't work as it should. Replace this with an reversed error expectation.
+ let(:mock_service) { double("Service").as_null_object }
+
it "should accept a Service class object upon initialization" do
- JsonRpc::RackApplication.should respond_to(:new).with(1).argument
+ expect {
+ JsonRpc::RackApplication.new(mock_service)
+ }.to_not raise_error
end
- let(:mock_service) { double("Service").as_null_object }
-
subject { JsonRpc::RackApplication.new(mock_service) }
let(:mock_request) { double "Rack Request" }

0 comments on commit e41d528

Please sign in to comment.