brazenhead 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,23 +13,23 @@ Feature: Functionality provided by the Brazenhead module
13
13
  Then I should receive a successful result from the Brazenhead module
14
14
 
15
15
  Scenario: Chaining two method calls together with second call on result of first
16
- When I chain together the methods "getCurrentListViews" and "size" using the target "LastResultOrRobotium"
16
+ When I chain together the methods "getCurrentViews" and "size" using the target "LastResultOrRobotium"
17
17
  Then I should receive a successful result from the Brazenhead module
18
- And the result from the chained calls should be "1"
18
+ And the result from the chained calls should match "\d+"
19
19
 
20
20
  Scenario: Chaining two method calls should use "LastResultOrRobotium" target by default
21
- When I chain together the methods "getCurrentListViews" and "size" on the Brazenhead module
21
+ When I chain together the methods "getCurrentViews" and "size" on the Brazenhead module
22
22
  Then I should receive a successful result from the Brazenhead module
23
- And the result from the chained calls should be "1"
23
+ And the result from the chained calls should match "\d+"
24
24
 
25
25
  Scenario: Chaining two method calls using a variable
26
26
  When I call "get_text" passing the argument "Graphics" and saving it into the variable "@@graphics@@"
27
- And then I call "click_on_view" using teh variable "@@graphics@@" using the target "Robotium"
28
- Then I should see "AlphaBitmap" from teh Brazenhead module
27
+ And then I call "click_on_view" using the variable "@@graphics@@" using the target "Robotium"
28
+ Then I should see "AlphaBitmap" from the Brazenhead module
29
29
 
30
30
  Scenario: Chaining twice
31
- When I chain together the methods "getCurrentListViews" and "size" on the Brazenhead module
31
+ When I chain together the methods "getCurrentViews" and "size" on the Brazenhead module
32
32
  And I call "get_text" passing the argument "Graphics" and saving it into the variable "@@graphics@@"
33
- And then I call "click_on_view" using teh variable "@@graphics@@" using the target "Robotium" on the same driver
34
- Then I should see "AlphaBitmap" from teh Brazenhead module
33
+ And then I call "click_on_view" using the variable "@@graphics@@" using the target "Robotium" on the same driver
34
+ Then I should see "AlphaBitmap" from the Brazenhead module
35
35
 
@@ -25,6 +25,6 @@ Feature: Calling Robotium methods
25
25
  Then I should receive a successful result
26
26
 
27
27
  Scenario: Chaining method calls
28
- When I call "getCurrentListViews" and then I call "size"
28
+ When I call "getCurrentViews" and then I call "size"
29
29
  Then I should receive a successful result
30
- And the result should be "1"
30
+ And the result should match "\d+"
@@ -17,8 +17,8 @@ Then /^I should receive a successful result from the Brazenhead module$/ do
17
17
  @driver.last_response.code.should == '200'
18
18
  end
19
19
 
20
- Then /^the result from the chained calls should be "(.*?)"$/ do |result|
21
- @driver.last_response.body.should == result
20
+ Then /^the result from the chained calls should match "(.*?)"$/ do |result|
21
+ @driver.last_response.body.should match Regexp.new(result)
22
22
  end
23
23
 
24
24
  When /^I chain together the methods "(.*?)" and "(.*?)" on the Brazenhead module$/ do |first_method, second_method|
@@ -32,21 +32,21 @@ When /^I call "(.*?)" passing the argument "(.*?)" and saving it into the variab
32
32
  @first_call = {:name => method, :arguments => argument, :variable => variable}
33
33
  end
34
34
 
35
- When /^then I call "(.*?)" using teh variable "(.*?)" using the target "(.*?)"$/ do |method, argument, target|
35
+ When /^then I call "(.*?)" using the variable "(.*?)" using the target "(.*?)"$/ do |method, argument, target|
36
36
  @driver.chain_calls do |driver|
37
37
  driver.send @first_call[:name], @first_call[:arguments], {:variable => @first_call[:variable]}
38
38
  driver.send method, argument, {:target => target}
39
39
  end
40
40
  end
41
41
 
42
- When /^then I call "(.*?)" using teh variable "(.*?)" using the target "(.*?)" on the same driver$/ do |method, argument, target|
42
+ When /^then I call "(.*?)" using the variable "(.*?)" using the target "(.*?)" on the same driver$/ do |method, argument, target|
43
43
  @driver.chain_calls do |driver|
44
44
  driver.send @first_call[:name], @first_call[:arguments], {:variable => @first_call[:variable]}
45
45
  driver.send method, argument, {:target => target}
46
46
  end
47
47
  end
48
48
 
49
- Then /^I should see "(.*?)" from teh Brazenhead module$/ do |value|
49
+ Then /^I should see "(.*?)" from the Brazenhead module$/ do |value|
50
50
  @driver.search_text value
51
51
  @driver.last_response.body.should == 'true'
52
52
  end
@@ -37,8 +37,8 @@ When /^I call "(.*?)" and then I call "(.*?)"$/ do |first_method, next_method|
37
37
  end
38
38
  end
39
39
 
40
- Then /^the result should be "(.*?)"$/ do |result|
41
- @driver.last_response.body.should eq result
40
+ Then /^the result should match "(.*?)"$/ do |result|
41
+ @driver.last_response.body.should match Regexp.new(result)
42
42
  end
43
43
 
44
44
  Then /^I should see "(.*?)"$/ do |text|
@@ -1,3 +1,3 @@
1
1
  module Brazenhead
2
- VERSION = "0.4.5"
2
+ VERSION = "0.4.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brazenhead
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-10-27 00:00:00.000000000 Z
13
+ date: 2013-03-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: childprocess
@@ -140,7 +140,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  segments:
142
142
  - 0
143
- hash: -4246091597289591092
143
+ hash: -1610332826201642605
144
144
  required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  none: false
146
146
  requirements:
@@ -149,10 +149,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  version: '0'
150
150
  segments:
151
151
  - 0
152
- hash: -4246091597289591092
152
+ hash: -1610332826201642605
153
153
  requirements: []
154
154
  rubyforge_project:
155
- rubygems_version: 1.8.24
155
+ rubygems_version: 1.8.25
156
156
  signing_key:
157
157
  specification_version: 3
158
158
  summary: Driver that accepts remote json requests and invokes methods inside Android