calabash-android 0.4.3.pre2 → 0.4.3.pre3

Sign up to get free protection for your applications and to get access to all the features.
@@ -72,7 +72,7 @@ module Operations
72
72
  end
73
73
 
74
74
  def start_test_server_in_background(options={})
75
- default_device.start_test_server_in_background()
75
+ default_device.start_test_server_in_background(options)
76
76
  end
77
77
 
78
78
  def shutdown_test_server
@@ -319,12 +319,13 @@ module Operations
319
319
  wake_up
320
320
  end
321
321
 
322
- puts "app_path: #{@app_path}"
323
- env_options = {:target_package => options[:target_package] || package_name(@app_path),
324
- :main_activity => options[:main_activity] || main_activity(@app_path),
322
+ env_options = {:target_package => package_name(@app_path),
323
+ :main_activity => main_activity(@app_path),
325
324
  :test_server_port => @test_server_port,
326
- :debug => options[:debug] || false,
327
- :class => options[:class] || "sh.calaba.instrumentationbackend.InstrumentationBackend"}
325
+ :debug => false,
326
+ :class => "sh.calaba.instrumentationbackend.InstrumentationBackend"}
327
+
328
+ env_options = env_options.merge(options)
328
329
 
329
330
  cmd_arr = [adb_command, "shell am instrument"]
330
331
 
@@ -1,5 +1,5 @@
1
1
  module Calabash
2
2
  module Android
3
- VERSION = "0.4.3.pre2"
3
+ VERSION = "0.4.3.pre3"
4
4
  end
5
5
  end
@@ -9,7 +9,7 @@ import sh.calaba.instrumentationbackend.actions.HttpServer;
9
9
 
10
10
  public class CalabashInstrumentationTestRunner extends InstrumentationTestRunner {
11
11
  @Override
12
- public void onCreate(Bundle arguments) {
12
+ public void onCreate(Bundle arguments) {
13
13
  try {
14
14
  Context context = getTargetContext ();
15
15
  Class<?> c = Class.forName("mono.MonoPackageManager");
@@ -24,6 +24,7 @@ public class CalabashInstrumentationTestRunner extends InstrumentationTestRunner
24
24
  HttpServer.instantiate(Integer.parseInt(arguments.getString("test_server_port")));
25
25
 
26
26
  InstrumentationBackend.testPackage = arguments.getString("target_package");
27
+ InstrumentationBackend.extras = arguments;
27
28
 
28
29
  try {
29
30
  InstrumentationBackend.mainActivity = Class.forName(arguments.getString("main_activity"));
@@ -1,5 +1,7 @@
1
1
  package sh.calaba.instrumentationbackend;
2
2
 
3
+ import android.content.Intent;
4
+ import android.os.Bundle;
3
5
  import sh.calaba.instrumentationbackend.actions.Actions;
4
6
  import sh.calaba.instrumentationbackend.actions.HttpServer;
5
7
  import android.Manifest;
@@ -17,6 +19,7 @@ import com.jayway.android.robotium.solo.SoloEnhanced;
17
19
  public class InstrumentationBackend extends ActivityInstrumentationTestCase2 {
18
20
  public static String testPackage;
19
21
  public static Class mainActivity;
22
+ public static Bundle extras;
20
23
 
21
24
  private static final String TAG = "InstrumentationBackend";
22
25
 
@@ -32,7 +35,10 @@ public class InstrumentationBackend extends ActivityInstrumentationTestCase2 {
32
35
  @Override
33
36
  protected void setUp() throws Exception {
34
37
  super.setUp();
35
-
38
+ Intent i = new Intent();
39
+ i.setClassName(testPackage, mainActivity.getName());
40
+ i.putExtras(extras);
41
+ setActivityIntent(i);
36
42
  solo = new SoloEnhanced(getInstrumentation(), this.getActivity());
37
43
  viewFetcher = new PublicViewFetcher(getInstrumentation(), this.getActivity());
38
44
  actions = new Actions(getInstrumentation(), this);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calabash-android
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3.pre2
4
+ version: 0.4.3.pre3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-03 00:00:00.000000000 Z
12
+ date: 2013-03-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cucumber