Skip to content

Commit

Permalink
Merge pull request ruboto#108 from DatekWireless/master
Browse files Browse the repository at this point in the history
Trying to get tests green
  • Loading branch information
donv committed Sep 11, 2011
2 parents 0dca8f6 + 5ed67eb commit 6b0aea2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
40 changes: 20 additions & 20 deletions assets/src/org/ruboto/test/ActivityTest.java
Expand Up @@ -33,28 +33,28 @@ public void runTest() throws Exception {
Log.i(getClass().getName(), "runTest");
Log.i(getClass().getName(), "runTest: " + getName());
if (Script.setUpJRuby(getActivity())) {
Log.i(getClass().getName(), "ruby ok");
try {
final Activity activity = getActivity();
Log.i(getClass().getName(), "activity ok");
runTestOnUiThread(new Runnable() {
public void run() {
String oldFile = Script.getScriptFilename();
Log.i(getClass().getName(), "ruby ok");
try {
final Activity activity = getActivity();
Log.i(getClass().getName(), "activity ok");
runTestOnUiThread(new Runnable() {
public void run() {
String oldFile = Script.getScriptFilename();

Log.i(getClass().getName(), "calling setup");
Script.setScriptFilename(filename);
Script.callMethod(setup, "call", activity);
Log.i(getClass().getName(), "setup ok");
Log.i(getClass().getName(), "calling setup");
Script.setScriptFilename(filename);
Script.callMethod(setup, "call", activity);
Log.i(getClass().getName(), "setup ok");

Script.setScriptFilename(filename);
Script.callMethod(block, "call", activity);
Script.setScriptFilename(oldFile);
}
});
} catch (Throwable t) {
throw new AssertionFailedError(t.getMessage());
}
Log.i(getClass().getName(), "runTest ok");
Script.setScriptFilename(filename);
Script.callMethod(block, "call", activity);
Script.setScriptFilename(oldFile);
}
});
} catch (Throwable t) {
throw new AssertionFailedError(t.getMessage() != null ? t.getMessage() : t.getClass().getName());
}
Log.i(getClass().getName(), "runTest ok");
} else {
throw new AssertionFailedError("Ruboto Core platform is missing.");
}
Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.rb
Expand Up @@ -162,7 +162,7 @@ def run_app_tests
puts "Skipping instrumentation tests on #{ANDROID_OS} since they don't work."
else
Dir.chdir "#{APP_DIR}/test" do
system 'rake test'
system 'rake test:quick'
assert_equal 0, $?, "tests failed with return code #$?"
end
end
Expand Down

0 comments on commit 6b0aea2

Please sign in to comment.