rubotium 0.0.24 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fefb30b1efc7287d1db4fbf534550a194b82d49a
4
- data.tar.gz: 433f676076146895d63c3a50f08d833504c4c7bc
3
+ metadata.gz: e214c6a6a6d5323bcc8fc46e10073a01c7e63721
4
+ data.tar.gz: f6819d0ed1aee488949dac3223bc150b2233aad0
5
5
  SHA512:
6
- metadata.gz: fd3710871a07d0e09ecccbc08b569ff56102f54805c965c2dac3e8c54fef48696d5b7257356632a90e540c87cece15adeec48318eac8b60667d095ce4ed9f6e4
7
- data.tar.gz: 2d282cd942b4a4be853aca4d6d7781746b595647bd6c03dc6e1de92ed4e1fd7ec3595d68ed80c13e99abf13427ff6803fb6afd85b146ac8d0455395d39c74cf9
6
+ metadata.gz: 8f937c8eac8b1ecf2e3995e0981ae258002e2d71320e08cefae0635b2b43eadc09ffe225ab67efd819ea3d4c0eb7921b6915eb077db854eff8d6a654b9a1d406
7
+ data.tar.gz: 866f3708b601b1e9e3a52b1d01896cae07638bb8cf051f65493d06ffe37bd8b131ccd42ca57ea1ebd1c2a2124a8566f07ae33a9e75c285e8fcbe3f236ad9466d
@@ -15,13 +15,19 @@ module Rubotium
15
15
 
16
16
  def adb_devices_command
17
17
  CMD.run_command('adb kill-server')
18
+ wait_for_adb
18
19
  CMD.run_command('adb start-server')
20
+ wait_for_adb
19
21
  CMD.run_command('adb devices', { :timeout => 5 } ).result
20
22
  end
21
23
 
24
+ def wait_for_adb
25
+ sleep 2
26
+ end
27
+
22
28
  def get_device_list
23
- tries = 4
24
- while ((list = adb_devices_command.split("\n")[1..-1]).empty? && tries > 0)
29
+ tries = 10
30
+ while (tries > 0 && (list = adb_devices_command.split("\n")[1..-1]).empty?)
25
31
  tries -= 1
26
32
  end
27
33
  attached_devices list
@@ -11,7 +11,7 @@ module Rubotium
11
11
  end
12
12
 
13
13
  def ==(other)
14
- name == other.name
14
+ other.instance_of?(self.class) && @name == other.name
15
15
  end
16
16
 
17
17
  def eql?(other)
@@ -1,3 +1,3 @@
1
1
  module Rubotium
2
- VERSION = "0.0.24"
2
+ VERSION = "0.0.25"
3
3
  end
@@ -55,8 +55,8 @@ describe Rubotium::Adb::Devices do
55
55
  end
56
56
 
57
57
  context 'when no devices are attached' do
58
- it 'should run adb_devices_command 5 times' do
59
- devices.should_receive(:adb_devices_command).exactly(5).times
58
+ it 'should run adb_devices_command 10 times' do
59
+ devices.should_receive(:adb_devices_command).exactly(10).times
60
60
  .and_return(Fixtures::Adb::Devices.no_devices_attached.result)
61
61
  devices.attached
62
62
  end
@@ -66,4 +66,4 @@ describe Rubotium::Adb::Devices do
66
66
  devices.attached.should == []
67
67
  end
68
68
  end
69
- end
69
+ end
@@ -33,13 +33,6 @@ describe Rubotium::TestsRunner do
33
33
  expect(runner.send :tests_queue).to be_empty
34
34
  end
35
35
 
36
- it 'executes tests on all devices' do
37
- pending
38
- expect(device1).to receive(:shell).exactly(1).times.and_return { sleep 1 }
39
- expect(device2).to receive(:shell).exactly(10).times
40
- runner.run_tests
41
- end
42
-
43
36
  it 'knows how many tests it has' do
44
37
  runner.tests_count.should eql(11)
45
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubotium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Slawomir Smiechura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-27 00:00:00.000000000 Z
11
+ date: 2015-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -229,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
229
  version: '0'
230
230
  requirements: []
231
231
  rubyforge_project:
232
- rubygems_version: 2.4.6
232
+ rubygems_version: 2.2.2
233
233
  signing_key:
234
234
  specification_version: 4
235
235
  summary: Run your Robotium tests with ease