test/test_rack_request.rb in schmobile-0.1.0 vs test/test_rack_request.rb in schmobile-0.1.1

- old
+ new

@@ -19,20 +19,17 @@ agent = self.send(phone) assert request("HTTP_USER_AGENT" => agent).is_mobile? end end - should "return true for a mobile browser" do - assert request("HTTP_USER_AGENT" => iphone).is_mobile? - end - should "return false when forced in the session" do Rack::Request.any_instance.stubs(:session).returns({ Rack::Schmobile::IS_MOBILE => false }) assert !request("HTTP_USER_AGENT" => iphone).is_mobile? end should "return true when forced in the session" do - assert request("rack.session" => { Rack::Schmobile::IS_MOBILE => "true" }).is_mobile? + Rack::Request.any_instance.stubs(:session).returns({ Rack::Schmobile::IS_MOBILE => true }) + assert request.is_mobile? end end context "with params" do should "return false when forced via a request parameter" do