Examples of RackInput


Examples of com.squareup.rack.RackInput

import static org.mockito.Mockito.when;

public class JRubyRackInputTest {
  @Test public void shouldWrapJavaIOExceptions() throws Exception {
    Ruby ruby = Ruby.newInstance();
    RackInput rackInput = mock(RackInput.class);
    when(rackInput.read(null)).thenThrow(new IOException("fake"));

    JRubyRackInput subject = new JRubyRackInput(ruby, rackInput);
    GlobalVariables globalVariables = ruby.getGlobalVariables();
    globalVariables.set("$rack_input", subject);
View Full Code Here

Examples of com.squareup.rack.RackInput

    return new RackEnvironment(content.build());
  }

  private RackInput rackInput(HttpServletRequest request) {
    try {
      return new RackInput(new TempfileBufferedInputStream(request.getInputStream()));
    } catch (IOException e) {
      throw propagate(e);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.