test/extr_test.rb in extr-1.0.4 vs test/extr_test.rb in extr-1.0.5

- old
+ new

@@ -1,12 +1,12 @@ require 'test_helper' class ExtrTest < ActiveSupport::TestCase - +=begin #include Rack::Test::Methods - def call_rails(env_params={}) + #def call_rails(env_params={}) @request = ActionDispatch::TestRequest.new(env_params) @request['REQUEST_METHOD'] = "POST" @request.host = "localhost" @request.port = 3000 @@ -28,12 +28,12 @@ test "no_ext_direct_request_by_get" do call_rails test_body = '{"bar":"foo"}' callback = 'foo' app = lambda { |env| [200, {'Content-Type' => 'application/json'}, [test_body]] } - body = Extr::Router.new(app, Extr::Config::ROUTER_PATH).call(@request).to_a - p body + #body = Extr::Router.new(app, Extr::Config::ROUTER_PATH).call(@request).to_a + #p body #p body #body.should.equal ["#{callback}(#{test_body})"] #call_rails #assert_equal 404, @response.first #assert_match Extr::Config::ROUTER_PATH #assert_response :missing @@ -44,8 +44,9 @@ #get "#{Extr::Config::ROUTER_PATH}" #get "#{Extr::Config::ROUTER_PATH}" #assert_response 404 end +=end end