This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# When using RN in combination with Cocoapods, a lot of | |
# things are broken. These are the fixes we had to append | |
# to our Podfile when upgrading to ReactNative@0.55.3. | |
# | |
# WARNING: Check those line numbers when you're on a different version! | |
def change_lines_in_file(file_path, &change) | |
print "Fixing #{file_path}...\n" | |
contents = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2014 Matthieu Harlé | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class URLRequestUnit extends InstrumentationTestCase | |
{ | |
private static final String API_URL = | |
"http://www.example.com/api/users"; | |
public void testHttpOkay() throws Exception { | |
MockURLStreamHandler handler = new MockURLStreamHandler(); | |
URL.setURLStreamHandlerFactory(handler); | |
UsersRequest request = new UsersRequest(); |