calabash-cucumber 0.9.13 → 0.9.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -105,7 +105,7 @@ When /^I clear "([^\"]*)"$/ do |name|
105
105
  macro %Q|I enter "" into the "#{name}" text field|
106
106
  end
107
107
 
108
- Then /^I clear input field number (\d+)$/ do |index|
108
+ Then /^I clear (?:input|text) field number (\d+)$/ do |index|
109
109
  index = index.to_i
110
110
  screenshot_and_raise "Index should be positive (was: #{index})" if (index<=0)
111
111
  set_text("textField index:#{index-1}","")
@@ -303,21 +303,21 @@ Then /^I see the "([^\"]*)"$/ do |text|
303
303
  macro %Q|I should see "#{text}"|
304
304
  end
305
305
 
306
- Then /^I see text starting with "([^\"]*)"$/ do |text|
306
+ Then /^I (?:should)? see text starting with "([^\"]*)"$/ do |text|
307
307
  res = query("view {text BEGINSWITH '#{text}'}").empty?
308
308
  if res
309
309
  screenshot_and_raise "No text found starting with: #{text}"
310
310
  end
311
311
  end
312
312
 
313
- Then /^I see text containing "([^\"]*)"$/ do |text|
313
+ Then /^I (?:should)? see text containing "([^\"]*)"$/ do |text|
314
314
  res = query("view {text LIKE '*#{text}*'}").empty?
315
315
  if res
316
316
  screenshot_and_raise "No text found containing: #{text}"
317
317
  end
318
318
  end
319
319
 
320
- Then /^I see text ending with "([^\"]*)"$/ do |text|
320
+ Then /^I (?:should)? see text ending with "([^\"]*)"$/ do |text|
321
321
  res = query("view {text ENDSWITH '#{text}'}").empty?
322
322
  if res
323
323
  screenshot_and_raise "No text found ending with: #{text}"
@@ -311,14 +311,19 @@ module Operations
311
311
  end
312
312
 
313
313
  def make_http_request( url, req )
314
- @http = @http || Net::HTTP.new(url.host, url.port)
314
+ @http = Net::HTTP.new(url.host, url.port)
315
315
  res = @http.start do |sess|
316
316
  sess.request req
317
317
  end
318
- res.body
318
+ body = res.body
319
+ begin
320
+ @http.finish if @http and @http.started?
321
+ rescue Exception => e
322
+ puts "Finish #{e}"
323
+ end
324
+ body
319
325
  end
320
326
 
321
-
322
327
  end
323
328
 
324
329
 
@@ -1,5 +1,5 @@
1
1
  module Calabash
2
2
  module Cucumber
3
- VERSION = "0.9.13"
3
+ VERSION = "0.9.14"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calabash-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.13
4
+ version: 0.9.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-10 00:00:00.000000000 Z
12
+ date: 2012-02-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cucumber
16
- requirement: &70262008311640 !ruby/object:Gem::Requirement
16
+ requirement: &70280043557400 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70262008311640
24
+ version_requirements: *70280043557400
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70262008309740 !ruby/object:Gem::Requirement
27
+ requirement: &70280043556000 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.7.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70262008309740
35
+ version_requirements: *70280043556000
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: json
38
- requirement: &70262008307440 !ruby/object:Gem::Requirement
38
+ requirement: &70280043542440 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70262008307440
46
+ version_requirements: *70280043542440
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: slowhandcuke
49
- requirement: &70262008306080 !ruby/object:Gem::Requirement
49
+ requirement: &70280043541860 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70262008306080
57
+ version_requirements: *70280043541860
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: net-http-persistent
60
- requirement: &70262008305400 !ruby/object:Gem::Requirement
60
+ requirement: &70280043541060 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70262008305400
68
+ version_requirements: *70280043541060
69
69
  description: calabash-cucumber drives tests for native iOS apps. You must link your
70
70
  app with calabash-ios-server framework to execute tests.
71
71
  email: