Commits

Michael Granger committed ee1b3bc

Fix a spec for newer versions of Mongrel2

Comments (0)

Files changed (1)

spec/strelka/app_spec.rb

 
 	it "uses the app's ID constant for the appid if .run is called without one" do
 		@app.const_set( :ID, 'testing-app' )
+		conn = double( "Mongrel2 connection", close: true )
 
 		Mongrel2::Handler.should_receive( :connection_info_for ).with( 'testing-app' ).
 			and_return([ TEST_SEND_SPEC, TEST_RECV_SPEC ])
 		Mongrel2::Connection.should_receive( :new ).
 			with( 'testing-app', TEST_SEND_SPEC, TEST_RECV_SPEC ).
-			and_return( :a_connection )
+			and_return( conn )
 
 		@app.run
 	end
 		@app.class_eval do
 			def self::name; "My::First::Blog" ; end
 		end
+		conn = double( "Mongrel2 connection", close: true )
 
 		Mongrel2::Handler.should_receive( :connection_info_for ).with( 'my-first-blog' ).
 			and_return([ TEST_SEND_SPEC, TEST_RECV_SPEC ])
 		Mongrel2::Connection.should_receive( :new ).
 			with( 'my-first-blog', TEST_SEND_SPEC, TEST_RECV_SPEC ).
-			and_return( :a_connection )
+			and_return( conn )
 
 		@app.run
 	end