briar 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MmZiNDY2NzY2Nzc5N2NhYjVmZmE4NWJmYTFjY2YzMDFhZDc1NzE2ZA==
4
+ MjI4ZTI0ZWZlZWJkMTdlYmIwYjY5ZmVlY2IwYjJkZmU1M2I1YjgzOA==
5
5
  data.tar.gz: !binary |-
6
- YmYwZjBiZDkxYjIxYTRhZjQ1ZmQ5YTFiZTc0NWFkNmVmNTY0NDEyMA==
6
+ NWU2YTZhOGM4YmFjNjg5ZDdjOGNhOGQ3NDY2MjQxNGIyNjRkMjhmZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YmZlMTI3ZDU0MzI5N2YyNTE5M2YzZGU1NTk1M2M1ZDE3MzQ1YmVhOWNkOWEx
10
- ZmUxYjkzNTQ3ZWFjNDk5ZmZlNmEzYjczMWFiMjRmNDY5YWJlZmVlZjJmODI3
11
- OGNkMDMzZGQyYTFlMmJkM2I0YjczOWM0NDkxZjE1MGM0MjU5NDE=
9
+ MDhhZjU2OGZhNzFhMWU3MDMzNWIyNjgxYjMwNTNlZTE2ZjU5NzExYjQ3Mzc5
10
+ YTk5ZjQyZDhjNGE3YmYzNzI0Nzc1ZDY3ODg4MDRjYjNkM2I0OTNmMGRkMzMw
11
+ M2UzZGM3ZTY0YWEzNDllYTU2NTg0N2UzNmQwODY2NjU4YjBjZjA=
12
12
  data.tar.gz: !binary |-
13
- MjU2MjY0MzZhZTM4OTlkODE3YWZjYmExNDljNzM3NGZhOTM4Nzk3NTllOWY1
14
- YjVkNTIyNTQ3N2I4Zjk5OWExNDZhZGMzOGM1MjQyMGQxYmE0YmM0OTg4M2Q1
15
- ODlhNjc2NTA0NTUzM2ZmMTAxMjk1MjZlMTI2MjJhOWY1YTQ1ZjY=
13
+ ZmY3OTgzMjlhYzRmNDU1MzdkZGU2MDY1OThiOGI0NmU4YTJkZGRiZTRmMjIz
14
+ ZWIxMjQ3MDRhN2NiMjRhODg0MmM2YTBjYmQ2YjU3MGEyOWQ2ZTA5MjExM2U3
15
+ ZGRjYWRjNTRhZjU0ZWFhMmQyNmJkNzcxZDQyYWY2MDVjNjhlNmI=
data/README.md CHANGED
@@ -3,11 +3,24 @@
3
3
  extends calabash-ios steps to provide steps for controlling complex ui
4
4
  elements like tables and pickers.
5
5
 
6
+ briar is not trying to provide steps that will work for every project
7
+ - it is neccessary that every project develop its own venacular.
8
+ instead, briar provides a library [lib] of ruby methods to build
9
+ application-specific steps from. the steps in the features directory
10
+ are meant to be examples of what briar can offer.
11
+
6
12
  https://github.com/calabash/calabash-ios.git
7
13
 
8
14
  to see briar in action, have a look at
9
15
  https://github.com/jmoody/briar-ios-example
10
16
 
17
+ ### motivation
18
+
19
+ DRY: i have several ios projects that use calabash-cucumber and i
20
+ found i was rewriting lots of steps and supporting code.
21
+
22
+ ## version numbers
23
+
11
24
  i will try my best to follow http://semver.org/ when naming the
12
25
  versions.
13
26
 
@@ -18,7 +31,11 @@ versions.
18
31
 
19
32
  ## Installation
20
33
 
21
- not ready for release
34
+ getting closer to stability
35
+
36
+ * there are still major problems with date picking
37
+ * still problems running tests on lesspainful - can upload to LP but
38
+ still cannot get all tests to run
22
39
 
23
40
  ## Usage
24
41
 
data/Rakefile CHANGED
@@ -1,12 +1,18 @@
1
- require "bundler/gem_tasks"
2
- require "./lib/briar/version.rb"
1
+ require 'bundler/gem_tasks'
2
+ require './lib/briar/version.rb'
3
3
  task :show_simulator do
4
4
  sh "/usr/bin/osascript -e 'tell application \"iPhone Simulator\" to activate'"
5
5
  sh "/usr/bin/osascript -e 'tell application \"RubyMine\" to activate'"
6
6
  end
7
7
 
8
- task :gem do
9
- sh "rm -f *.gem"
10
- sh "gem build briar.gemspec --verbose"
11
- sh "gem install briar-#{Briar::VERSION}.gem"
12
- end
8
+ #task :gem do
9
+ # sh 'rm -f *.gem'
10
+ # sh 'gem build briar.gemspec --verbose'
11
+ # sh "gem install briar-#{Briar::VERSION}.gem"
12
+ #end
13
+ #
14
+ #task :push do
15
+ # sh 'gem update'
16
+ # sh 'gem build briar.gemspec'
17
+ # sh "gem push briar-#{Briar::VERSION}.gem"
18
+ #end
@@ -14,11 +14,14 @@ Gem::Specification.new do |gem|
14
14
  gem.homepage = 'https://github.com/jmoody/briar'
15
15
  gem.license = 'MIT'
16
16
 
17
- gem.add_runtime_dependency 'calabash-cucumber' #, '0.9.138'
17
+ gem.add_runtime_dependency 'calabash-cucumber'
18
18
  gem.add_runtime_dependency 'rake', '10.0.3'
19
19
  gem.add_runtime_dependency 'bundler'
20
20
  gem.add_runtime_dependency 'lesspainful'
21
+ gem.add_runtime_dependency 'syntax'
21
22
  gem.add_runtime_dependency 'rspec'
23
+
24
+
22
25
  # rubymine is not picking up development dependencies in the gemspec
23
26
  #gem.add_development_dependency 'rspec'
24
27
 
@@ -1,5 +1,3 @@
1
- #include Briar::Core
2
-
3
1
  Then /^I touch the "([^"]*)" button on the action sheet$/ do |button_title|
4
2
  wait_for_animation
5
3
  wait_for_animation
@@ -1,5 +1,3 @@
1
- #include Briar::Alerts_and_Sheets
2
-
3
1
  Then /^I should see alert with "([^"]*)" button$/ do |button_id|
4
2
  should_see_alert_button button_id
5
3
  end
@@ -10,7 +8,6 @@ Then /^I should see alert with title "([^"]*)"$/ do |title|
10
8
  end
11
9
  end
12
10
 
13
-
14
11
  Then /^I should see alert with message "([^"]*)"$/ do |message|
15
12
  unless query('alertView child label', :text).include?(message)
16
13
  screenshot_and_raise "i do not see an alert view with message '#{message}'"
@@ -6,6 +6,7 @@ end
6
6
 
7
7
  Then /^I should see email view with body that contains "([^"]*)"$/ do |text|
8
8
  if gestalt.is_ios6?
9
+ warn_about_ios6_email_view
9
10
  puts 'WARN: iOS6 detected - cannot test for email views on iOS simulator or devices'
10
11
  else
11
12
  wait_for_animation
@@ -16,19 +17,26 @@ Then /^I should see email view with body that contains "([^"]*)"$/ do |text|
16
17
  end
17
18
 
18
19
  Then /^I touch the "([^"]*)" row and wait to see the email view$/ do |row_id|
19
- should_see_row row_id
20
- touch("tableViewCell marked:'#{row_id}'")
21
- wait_for_animation
22
- if gestalt.is_ios6?
23
- puts 'WARN: iOS6 detected - cannot test for email views on iOS simulator or devices'
20
+ if device_can_send_email
21
+ # cannot do the usual - touch_row_and_wait_to_see because sometimes
22
+ # we will not see because in iOS 6, email compose views cannot be queried
23
+ # by calabash
24
+ should_see_row row_id
25
+ touch("tableViewCell marked:'#{row_id}'")
26
+ wait_for_animation
27
+ if gestalt.is_ios6?
28
+ warn_about_ios6_email_view
29
+ else
30
+ should_see_mail_view
31
+ end
24
32
  else
25
- should_see_mail_view
33
+ pending 'device is not configured for email so a system alert is probably generated, which we cannot touch'
26
34
  end
27
35
  end
28
36
 
29
37
  Then /^I should see email view with "([^"]*)" in the subject$/ do |text|
30
38
  if gestalt.is_ios6?
31
- puts 'WARN: iOS6 detected - cannot test for email views on iOS simulator or devices'
39
+ warn_about_ios6_email_view
32
40
  else
33
41
  wait_for_animation
34
42
  should_see_mail_view
@@ -40,16 +48,9 @@ end
40
48
 
41
49
  Then /^I should see email view with recipients? "([^"]*)"$/ do |comma_sep_addrs|
42
50
  if gestalt.is_ios6?
43
- puts 'WARN: iOS6 detected - cannot test for email views on iOS simulator or devices'
51
+ warn_about_ios6_email_view
44
52
  else
45
- should_see_mail_view
46
- wait_for_animation
47
- addrs = comma_sep_addrs.split(/, ?/)
48
- addrs.each do |expected|
49
- unless email_to_contains? expected.strip
50
- screenshot_and_raise "expected to see '#{expected}' in the email 'to' field but found '#{email_to}'"
51
- end
52
- end
53
+ should_see_recipients comma_sep_addrs
53
54
  end
54
55
  end
55
56
 
@@ -60,7 +61,7 @@ end
60
61
 
61
62
  Then /^I should see email view with text like "([^"]*)" in the subject$/ do |text|
62
63
  if gestalt.is_ios6?
63
- puts 'WARN: iOS6 detected - cannot test for email views on iOS simulator or devices'
64
+ warn_about_ios6_email_view
64
65
  else
65
66
  should_see_mail_view
66
67
  wait_for_animation
@@ -71,16 +72,16 @@ Then /^I should see email view with text like "([^"]*)" in the subject$/ do |tex
71
72
  end
72
73
 
73
74
  When /^I cancel email editing I should see the "([^"]*)" view$/ do |view_id|
74
- if gestalt.is_ios6?
75
- puts 'WARN: iOS6 detected - cannot test for email views on iOS simulator or devices'
76
- else
77
- should_see_mail_view
78
- wait_for_animation
79
- touch_navbar_item 'Cancel'
80
- wait_for_animation
81
- touch_transition("button marked:'Delete Draft'",
82
- "view marked:'#{view_id}'",
83
- {:timeout=>TOUCH_TRANSITION_TIMEOUT,
84
- :retry_frequency=>TOUCH_TRANSITION_RETRY_FREQ})
75
+ delete_draft_and_wait_for view_id
76
+ end
77
+
78
+ Given(/^we are testing on the simulator or a device configured to send emails$/) do
79
+ # motivation: the simulator can always present the compose mail dialog, but
80
+ # devices with no email accounts active/configured will display
81
+ # a system-level alert when MFMailComposeViewController alloc] init]
82
+ # is called.
83
+ # todo: figure out how to deal with system-level no-email-configured alert
84
+ unless device_can_send_email
85
+ pending 'device is not configured to send email - we cannot proceed with email view testing'
85
86
  end
86
87
  end
@@ -1,5 +1,3 @@
1
- require 'calabash-cucumber'
2
-
3
1
  module Briar
4
2
  module Alerts_and_Sheets
5
3
  def alert_exists? (alert_id)
@@ -28,5 +26,9 @@ module Briar
28
26
  end
29
27
  end
30
28
 
29
+ def dismiss_alert_with_button (button_label)
30
+ touch("alertView child button marked:'#{button_label}'")
31
+ end
32
+
31
33
  end
32
34
  end
@@ -6,6 +6,18 @@ module Briar
6
6
  !query('navigationBar').empty?
7
7
  end
8
8
 
9
+ def should_see_navbar
10
+ unless navbar_visible?
11
+ screenshot_and_raise 'should see the nav bar'
12
+ end
13
+ end
14
+
15
+ def should_not_see_navbar
16
+ if navbar_visible?
17
+ screenshot_and_raise 'should not see the nav bar'
18
+ end
19
+ end
20
+
9
21
  def navbar_has_back_button?
10
22
  !query('navigationItemButtonView').empty?
11
23
  end
@@ -66,9 +78,12 @@ module Briar
66
78
  end
67
79
 
68
80
  def touch_navbar_item(name)
81
+ wait_for(:timeout => 1.0,
82
+ :retry_frequency => 0.4) do
83
+ index_of_navbar_button(name) != nil
84
+ end
69
85
  wait_for_animation
70
86
  idx = index_of_navbar_button name
71
- #puts "index of nav bar button: #{idx}"
72
87
  if idx
73
88
  touch("navigationButton index:#{idx}")
74
89
  step_pause
@@ -19,13 +19,17 @@ module Briar
19
19
  end
20
20
 
21
21
  def index_of_tabbar_item(name)
22
- if tabbar_visible?
23
- tabs = query('tabBarButton', :accessibilityLabel)
24
- tabs.index(name)
25
- end
22
+ tabs = query('tabBarButton', :accessibilityLabel)
23
+ tabs.index(name)
26
24
  end
27
25
 
28
26
  def touch_tabbar_item(name)
27
+ wait_for(:timeout => 1.0,
28
+ :retry_frequency => 0.4) do
29
+ index_of_tabbar_item(name) != nil
30
+ end
31
+ wait_for_animation
32
+ should_see_tabbar
29
33
  idx = index_of_tabbar_item name
30
34
  if idx
31
35
  touch "tabBarButton index:#{idx}"
@@ -36,6 +40,7 @@ module Briar
36
40
  end
37
41
 
38
42
  def should_see_tab_at_index(name, index)
43
+ should_see_tabbar
39
44
  tabs = query('tabBarButton', :accessibilityLabel)
40
45
  unless tabs.index(name) == index.to_i
41
46
  screenshot_and_raise "should have seen tab named '#{name}' at index '#{index}' but found these: '#{tabs}'"
@@ -58,5 +58,29 @@ module Briar
58
58
  touch("view marked:'#{view_id}'")
59
59
  end
60
60
 
61
+
62
+ def wait_for_view (view_id, timeout=1.0)
63
+ msg = "waited for '#{timeout}' seconds but did not see '#{view_id}'"
64
+ wait_for(:timeout => timeout,
65
+ :retry_frequency => 0.2,
66
+ :post_timeout => 0.1,
67
+ :timeout_message => msg ) do
68
+ view_exists? view_id
69
+ end
70
+ end
71
+
72
+ def wait_for_view_to_disappear(view_id, timeout=1.0)
73
+ views = [view_id]
74
+ msg = "waited for '#{timeout}' seconds for '#{view_id}' to disappear but it is still visible"
75
+ wait_for_elements_do_not_exist(views, {:timeout => timeout,
76
+ :retry_frequency => 0.2,
77
+ :post_timeout => 0.1,
78
+ :timeout_message => msg})
79
+ end
80
+
81
+ def touch_and_wait_to_disappear(view_id, timeout=1.0)
82
+ touch("view marked:'#{view_id}'")
83
+ wait_for_view_to_disappear view_id, timeout
84
+ end
61
85
  end
62
86
  end
@@ -3,13 +3,17 @@ require 'calabash-cucumber'
3
3
  module Briar
4
4
  module Email
5
5
 
6
+ def warn_about_ios6_email_view
7
+ warn 'WARN: iOS6 detected - cannot test for email views on iOS simulator or devices'
8
+ end
9
+
6
10
  def email_body
7
11
  query("view:'MFComposeTextContentView'", :text)
8
12
  end
9
13
 
10
14
  def email_body_contains? (text)
11
15
  if gestalt.is_ios6?
12
- puts 'WARN: cannot test for email body text on iOS 6 - see https://groups.google.com/d/topic/calabash-ios/Ff3XFsjp-B0/discussion'
16
+ warn 'WARN: iOS6 detected - cannot test for email body text https://groups.google.com/d/topic/calabash-ios/Ff3XFsjp-B0/discussion'
13
17
  else
14
18
  !query("view:'MFComposeTextContentView' {text LIKE '*#{text}*'}").empty?
15
19
  end
@@ -21,7 +25,7 @@ module Briar
21
25
 
22
26
  def email_subject_is? (text)
23
27
  if gestalt.is_ios6?
24
- puts 'WARN: cannot test for email subject text on iOS 6 - see https://groups.google.com/d/topic/calabash-ios/Ff3XFsjp-B0/discussion'
28
+ warn 'WARN: iOS6 detected - cannot test for email subject text https://groups.google.com/d/topic/calabash-ios/Ff3XFsjp-B0/discussion'
25
29
  else
26
30
  email_subject.eql? text
27
31
  end
@@ -29,7 +33,7 @@ module Briar
29
33
 
30
34
  def email_subject_has_text_like? (text)
31
35
  if gestalt.is_ios6?
32
- puts 'WARN: cannot test for email subject text on iOS 6 - see https://groups.google.com/d/topic/calabash-ios/Ff3XFsjp-B0/discussion'
36
+ warn 'WARN: iOS6 detected - cannot test for email subject text https://groups.google.com/d/topic/calabash-ios/Ff3XFsjp-B0/discussion'
33
37
  else
34
38
  !query("view:'MFComposeSubjectView' {text LIKE '*#{text}*'}").empty?
35
39
  end
@@ -41,7 +45,7 @@ module Briar
41
45
 
42
46
  def email_to_field_is? (text)
43
47
  if gestalt.is_ios6?
44
- puts "WARN: iOS6 detected - cannot test for email 'to' field on iOS simulator or devices"
48
+ warn 'WARN: iOS6 detected - cannot test for email to field https://groups.google.com/d/topic/calabash-ios/Ff3XFsjp-B0/discussion'
45
49
  else
46
50
  email_to.eql? text
47
51
  end
@@ -52,22 +56,50 @@ module Briar
52
56
  addrs.include? address
53
57
  end
54
58
 
59
+ def should_see_recipients (addresses)
60
+ should_see_mail_view
61
+ wait_for_animation
62
+ addrs = addresses.split(/, ?/)
63
+ addrs.each do |expected|
64
+ unless email_to_contains? expected.strip
65
+ screenshot_and_raise "expected to see '#{expected}' in the email 'to' field but found '#{email_to}'"
66
+ end
67
+ end
68
+ end
69
+
55
70
  def is_ios5_mail_view
56
71
  query("layoutContainerView descendant view:'MFMailComposeView'").count == 1
57
72
  end
58
73
 
59
74
  def is_ios6_mail_view
60
75
  gestalt.is_ios6?
61
- # sometimes this is returning false
62
- # access_ids = query("view", :accessibilityIdentifier)
63
- # access_ids.member?("RemoteViewBridge")
64
76
  end
65
77
 
66
- def should_see_mail_view
67
- wait_for_animation
78
+ def should_see_mail_view (opts={:wait => true})
79
+ wait = opts[:wait]
80
+ wait_for_animation if wait || wait == nil
68
81
  unless is_ios5_mail_view || is_ios6_mail_view
69
82
  screenshot_and_raise 'expected to see email view'
70
83
  end
71
84
  end
85
+
86
+ def device_can_send_email
87
+ return true if gestalt.is_simulator?
88
+ backdoor('calabash_backdoor_configured_for_mail:', 'ignorable').eql? 'YES'
89
+ end
90
+
91
+ def delete_draft_and_wait_for (view_id)
92
+ if gestalt.is_ios6?
93
+ warn_about_ios6_email_view
94
+ else
95
+ should_see_mail_view({:wait => false})
96
+ touch_navbar_item 'Cancel'
97
+ wait_for_animation
98
+ touch_transition("button marked:'Delete Draft'",
99
+ "view marked:'#{view_id}'",
100
+ {:timeout=>TOUCH_TRANSITION_TIMEOUT,
101
+ :retry_frequency=>TOUCH_TRANSITION_RETRY_FREQ})
102
+ end
103
+ end
72
104
  end
73
105
  end
@@ -1,24 +1,28 @@
1
1
  require 'json'
2
2
 
3
3
  module Briar
4
- GESTALT_IPHONE = "iPhone"
5
- GESTALT_IPAD = "iPad"
6
- GESTALT_IPHONE5 = "Retina 4-inch"
7
- GESTALT_SIM_SYS = "x86_64"
4
+ GESTALT_IPHONE = 'iPhone'
5
+ GESTALT_IPAD = 'iPad'
6
+ GESTALT_IPHONE5 = 'Retina 4-inch'
7
+ GESTALT_SIM_SYS = 'x86_64'
8
+ GESTALT_IPOD = 'iPod'
9
+
8
10
 
9
11
  class Gestalt
10
12
 
11
- attr_accessor :device_family
12
- attr_accessor :simulator_details, :ios_version
13
- attr_accessor :system
13
+ attr_reader :device_family
14
+ attr_reader :simulator_details, :ios_version
15
+ attr_reader :system
16
+ attr_reader :framework_version
14
17
 
15
18
  def initialize (json)
16
19
  ht = JSON.parse json
17
- simulator_device = ht["simulator_device"]
18
- @system = ht["system"]
20
+ simulator_device = ht['simulator_device']
21
+ @system = ht['system']
19
22
  @device_family = @system.eql?(GESTALT_SIM_SYS) ? simulator_device : @system.split(/[\d,.]/).first
20
- @simulator_details = ht["simulator"]
21
- @ios_version = ht["iOS_version"]
23
+ @simulator_details = ht['simulator']
24
+ @ios_version = ht['iOS_version']
25
+ @framework_version = ht['version']
22
26
  end
23
27
 
24
28
  def is_simulator?
@@ -33,13 +37,17 @@ module Briar
33
37
  self.device_family.eql? GESTALT_IPHONE
34
38
  end
35
39
 
40
+ def is_ipod?
41
+ self.device_family.eql? GESTALT_IPOD
42
+ end
43
+
36
44
  def is_ipad?
37
45
  self.device_family.eql? GESTALT_IPAD
38
46
  end
39
47
 
40
48
  def is_iphone_5?
41
49
  return self.simulator_details.split(/[(),]/)[3].eql? GESTALT_IPHONE5 if self.is_simulator?
42
- return self.system.split(/[\D]/).delete_if { |x| x.eql?("") }.first.eql?("5") if self.is_device?
50
+ return self.system.split(/[\D]/).delete_if { |x| x.eql?('') }.first.eql?('5') if self.is_device?
43
51
  end
44
52
 
45
53
  def version_hash (version_str)
@@ -54,13 +62,12 @@ module Briar
54
62
  end
55
63
 
56
64
  def is_ios6?
57
- self.version_hash(self.ios_version)[:major_version].eql?("6")
65
+ self.version_hash(self.ios_version)[:major_version].eql?('6')
58
66
  end
59
67
 
60
68
  def is_ios5?
61
- self.version_hash(self.ios_version)[:major_version].eql?("5")
69
+ self.version_hash(self.ios_version)[:major_version].eql?('5')
62
70
  end
63
-
64
71
  end
65
72
  end
66
73
 
@@ -261,7 +261,6 @@ to use the automatic mode, include this category in your CALABASH target
261
261
 
262
262
  def set_picker_date_with_date_time_str (date_time_str, opts={:animated => 1,
263
263
  :objc_format => PICKER__OBJC___SET_PICKER_DATE__DATE_AND_TIME_FMT})
264
- query('datePicker', [{respondsToSelector: 'minuteInterval'}])
265
264
 
266
265
  res = query('datePicker', [{setDateWithString:date_time_str},
267
266
  {format:"#{opts[:objc_format]}"},
@@ -76,11 +76,6 @@ module Briar
76
76
  ## iOS 4 and 5
77
77
 
78
78
  (arr.length == 1) and (arr.first.eql? text)
79
- ## iOS 6
80
- #if arr.length > 1
81
- #
82
- # pending "iOS 6 can have duplicate subviews"
83
- # arr.member?(text)
84
79
  end
85
80
 
86
81
 
@@ -110,7 +105,7 @@ module Briar
110
105
  def scroll_until_i_see_row (dir, row_id)
111
106
  wait_poll({:until_exists => "tableView descendant tableViewCell marked:'#{row_id}'",
112
107
  :timeout => 2}) do
113
- scroll('tableView index:0', dir)
108
+ scroll('tableView', dir)
114
109
  end
115
110
 
116
111
  unless row_exists?(row_id)
@@ -1,3 +1,3 @@
1
1
  module Briar
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
@@ -7,7 +7,7 @@ module Briar
7
7
  DEVICE__IPHONE_5__IOS_6_JSON = "{\"outcome\":\"SUCCESS\",\"app_name\":\"Rise Up CAL\",\"iOS_version\":\"6.0.1\",\"app_version\":\"1.0\",\"system\":\"iPhone5,0\",\"app_id\":\"org.recoverywarrriors.RiseUp-cal\",\"version\":\"0.9.125\"}"
8
8
  DEVICE__IPAD1__IOS_5_JSON = "{\"outcome\":\"SUCCESS\",\"app_name\":\"Rise Up CAL\",\"iOS_version\":\"5.1.1\",\"app_version\":\"1.0\",\"system\":\"iPad1,1\",\"app_id\":\"org.recoverywarrriors.RiseUp-cal\",\"version\":\"0.9.125\"}"
9
9
 
10
- describe "Gestalt" do
10
+ describe 'Gestalt' do
11
11
  before(:each) do
12
12
  @sim_iphone_5_ios6 = Gestalt.new(SIM__IPHONE_5__IOS_6_JSON)
13
13
  @device_iphone4_ios6 = Gestalt.new(DEVICE__IPHONE_4__IOS_6_JSON)
@@ -15,7 +15,7 @@ module Briar
15
15
  @device_ipad1_ios5 = Gestalt.new(DEVICE__IPAD1__IOS_5_JSON)
16
16
  end
17
17
 
18
- it "should be able to determine ios major version" do
18
+ it 'should be able to determine ios major version' do
19
19
  @sim_iphone_5_ios6.is_ios6?.should == true
20
20
  @sim_iphone_5_ios6.is_ios5?.should == false
21
21
 
@@ -27,7 +27,7 @@ module Briar
27
27
  end
28
28
 
29
29
 
30
- it "should be able to determine if running on device or simulator" do
30
+ it 'should be able to determine if running on device or simulator' do
31
31
  @sim_iphone_5_ios6.is_simulator?.should == true
32
32
  @sim_iphone_5_ios6.is_device?.should == false
33
33
 
@@ -40,7 +40,7 @@ module Briar
40
40
  end
41
41
 
42
42
 
43
- it "should be able to determine the device family" do
43
+ it 'should be able to determine the device family' do
44
44
  @sim_iphone_5_ios6.is_iphone?.should == true
45
45
  @sim_iphone_5_ios6.is_ipad?.should == false
46
46
 
@@ -52,11 +52,15 @@ module Briar
52
52
 
53
53
  end
54
54
 
55
- it "should be able to determine the if the runtime is on iphone 5" do
55
+ it 'should be able to determine the if the runtime is on iphone 5' do
56
56
  @sim_iphone_5_ios6.is_iphone_5?.should == true
57
57
  @device_iphone4_ios6.is_iphone_5?.should == false
58
58
  @device_iphone5_ios6.is_iphone_5?.should == true
59
59
  @device_ipad1_ios5.is_iphone_5?.should == false
60
60
  end
61
+
62
+ it 'should be able to determine the calabash version' do
63
+ @sim_iphone_5_ios6.framework_version.should == '0.9.126'
64
+ end
61
65
  end
62
66
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: briar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Moody
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-05 00:00:00.000000000 Z
11
+ date: 2013-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: calabash-cucumber
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ! '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: syntax
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: rspec
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -170,7 +184,7 @@ rubyforge_project:
170
184
  rubygems_version: 2.0.3
171
185
  signing_key:
172
186
  specification_version: 4
173
- summary: briar-0.0.6
187
+ summary: briar-0.0.7
174
188
  test_files:
175
189
  - features/step_definitions/alerts_and_sheets/action_sheet_steps.rb
176
190
  - features/step_definitions/alerts_and_sheets/alert_view_steps.rb