Skip to content
This repository
Browse code

Merge pull request #114 from moll/patch-1

Fix Ctrl-C on Ruby v1.8.7.
  • Loading branch information...
commit 54b37cf9a51df49a77d15640e3e0caa46a508c1d 2 parents 91c1306 + b6681ca
Rajan Agaskar authored November 12, 2012
2  lib/jasmine/dependencies.rb
@@ -19,7 +19,7 @@ def rails3?
19 19
       end
20 20
 
21 21
       def legacy_rack?
22  
-        !Rack.constants.include?(:Server)
  22
+        !defined?(Rack::Server)
23 23
       end
24 24
 
25 25
       def rails_3_asset_pipeline?
12  spec/dependencies_spec.rb
@@ -311,17 +311,5 @@ module Rails
311 311
         end
312 312
       end
313 313
     end
314  
-
315  
-    describe "legacy_rack?" do
316  
-      it "should return false if Rack::Server exists" do
317  
-        Rack.stub(:constants).and_return([:Server])
318  
-        Jasmine::Dependencies.legacy_rack?.should be_false
319  
-      end
320  
-      it "should return true if Rack::Server does not exist" do
321  
-        Rack.stub(:constants).and_return([])
322  
-        Jasmine::Dependencies.legacy_rack?.should be_true
323  
-      end
324  
-    end
325 314
   end
326  
-
327 315
 end

0 notes on commit 54b37cf

Please sign in to comment.
Something went wrong with that request. Please try again.