iCuke 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitmodules +1 -1
- data/Gemfile +12 -0
- data/Gemfile.lock +41 -0
- data/README.markdown +126 -0
- data/Rakefile +34 -12
- data/VERSION +1 -1
- data/bin/icuke +12 -10
- data/ext/Rakefile +6 -0
- data/ext/iCuke/{sdk3.1/DefaultsResponse.h → DefaultsResponse.h} +0 -0
- data/ext/iCuke/{sdk3.1/DefaultsResponse.m → DefaultsResponse.m} +0 -0
- data/ext/iCuke/{sdk3.1/EventResponse.h → EventResponse.h} +0 -0
- data/ext/iCuke/{sdk3.1/EventResponse.m → EventResponse.m} +0 -0
- data/ext/iCuke/{sdk3.1/ModuleResponse.h → ModuleResponse.h} +0 -0
- data/ext/iCuke/{sdk3.1/ModuleResponse.m → ModuleResponse.m} +0 -0
- data/ext/iCuke/{sdk3.1/QuitResponse.h → QuitResponse.h} +0 -0
- data/ext/iCuke/{sdk3.1/QuitResponse.m → QuitResponse.m} +0 -0
- data/ext/iCuke/Rakefile +14 -13
- data/ext/iCuke/{sdk3.1/Recorder.h → Recorder.h} +0 -0
- data/ext/iCuke/{sdk3.1/Recorder.m → Recorder.m} +0 -0
- data/ext/iCuke/{sdk3.1/RecorderResponse.h → RecorderResponse.h} +0 -0
- data/ext/iCuke/{sdk3.1/RecorderResponse.m → RecorderResponse.m} +0 -0
- data/ext/iCuke/{sdk3.1/SynthesizeSingleton.h → SynthesizeSingleton.h} +0 -0
- data/ext/iCuke/{sdk3.1/ViewResponse.h → ViewResponse.h} +0 -0
- data/ext/iCuke/{sdk3.1/ViewResponse.m → ViewResponse.m} +0 -0
- data/ext/iCuke/{sdk3.1/Viewer.h → Viewer.h} +0 -0
- data/ext/iCuke/{sdk4.0/Viewer.m → Viewer.m} +0 -0
- data/ext/iCuke/{sdk3.1/iCukeHTTPResponseHandler.h → iCukeHTTPResponseHandler.h} +0 -0
- data/ext/iCuke/{sdk3.1/iCukeHTTPResponseHandler.m → iCukeHTTPResponseHandler.m} +0 -0
- data/ext/iCuke/{sdk3.1/iCukeHTTPServer.h → iCukeHTTPServer.h} +0 -0
- data/ext/iCuke/{sdk4.0/iCukeHTTPServer.m → iCukeHTTPServer.m} +4 -2
- data/ext/iCuke/{sdk3.1/iCukeServer.h → iCukeServer.h} +0 -0
- data/ext/iCuke/{sdk3.1/iCukeServer.m → iCukeServer.m} +0 -0
- data/ext/iCuke/{sdk3.1/json → json}/JSON.h +0 -0
- data/ext/iCuke/{sdk3.1/json → json}/NSObject+SBJSON.h +0 -0
- data/ext/iCuke/{sdk3.1/json → json}/NSObject+SBJSON.m +0 -0
- data/ext/iCuke/{sdk3.1/json → json}/NSString+SBJSON.h +0 -0
- data/ext/iCuke/{sdk3.1/json → json}/NSString+SBJSON.m +0 -0
- data/ext/iCuke/{sdk3.1/json → json}/SBJSON.h +0 -0
- data/ext/iCuke/{sdk3.1/json → json}/SBJSON.m +0 -0
- data/ext/iCuke/{sdk3.1/json → json}/SBJsonBase.h +0 -0
- data/ext/iCuke/{sdk3.1/json → json}/SBJsonBase.m +0 -0
- data/ext/iCuke/{sdk3.1/json → json}/SBJsonParser.h +0 -0
- data/ext/iCuke/{sdk3.1/json → json}/SBJsonParser.m +0 -0
- data/ext/iCuke/{sdk3.1/json → json}/SBJsonWriter.h +0 -0
- data/ext/iCuke/{sdk3.1/json → json}/SBJsonWriter.m +0 -0
- data/features/starting_project.feature +18 -0
- data/features/step_definitions/shell.rb +41 -0
- data/features/support/env.rb +2 -0
- data/features/support/environment.rb +40 -0
- data/features/supported_sdks.feature +12 -0
- data/iCuke.gemspec +149 -161
- data/lib/icuke/configuration.rb +19 -0
- data/lib/icuke/core_ext.rb +27 -0
- data/lib/icuke/cucumber.rb +29 -265
- data/lib/icuke/cucumber_compat.rb +4 -0
- data/lib/icuke/icuke_world.rb +149 -0
- data/lib/icuke/sdk.rb +5 -13
- data/lib/icuke/simulator_driver.rb +201 -0
- data/lib/icuke/waxsim.rb +47 -9
- data/spec/cucumber_spec.rb +130 -0
- data/spec/fixtures/controls_page.xml +252 -0
- data/spec/process_spec.rb +76 -0
- data/spec/screen_spec.rb +173 -0
- data/spec/simulate_spec.rb +75 -0
- data/spec/simulator_spec.rb +28 -0
- data/spec/spec.opts +2 -0
- data/spec/spec_helper.rb +67 -0
- metadata +222 -121
- data/.gitignore +0 -15
- data/README.rdoc +0 -68
- data/ext/WaxSim/Simulator.h +0 -31
- data/ext/WaxSim/Simulator.m +0 -131
- data/ext/WaxSim/WaxSim.m +0 -110
- data/ext/WaxSim/WaxSim.xcodeproj/project.pbxproj +0 -238
- data/ext/WaxSim/WaxSim_Prefix.pch +0 -7
- data/ext/WaxSim/build/Release/waxsim +0 -0
- data/ext/WaxSim/build/Release/waxsim.dSYM/Contents/Info.plist +0 -20
- data/ext/WaxSim/build/Release/waxsim.dSYM/Contents/Resources/DWARF/waxsim +0 -0
- data/ext/WaxSim/build/WaxSim.build/Release/WaxSim.build/Objects-normal/x86_64/Simulator.o +0 -0
- data/ext/WaxSim/build/WaxSim.build/Release/WaxSim.build/Objects-normal/x86_64/WaxSim.o +0 -0
- data/ext/WaxSim/build/WaxSim.build/Release/WaxSim.build/Objects-normal/x86_64/waxsim.LinkFileList +0 -2
- data/ext/WaxSim/build/WaxSim.build/Release/WaxSim.build/WaxSim.dep +0 -6
- data/ext/WaxSim/build/WaxSim.build/Release/WaxSim.build/WaxSim~.dep +0 -6
- data/ext/WaxSim/build/WaxSim.build/Release/WaxSim.build/build-state.dat +0 -227
- data/ext/WaxSim/build/WaxSim.build/Release/WaxSim.build/build-state~.dat +0 -227
- data/ext/WaxSim/build/WaxSim.build/Release/WaxSim.build/waxsim-all-target-headers.hmap +0 -0
- data/ext/WaxSim/build/WaxSim.build/Release/WaxSim.build/waxsim-generated-files.hmap +0 -0
- data/ext/WaxSim/build/WaxSim.build/Release/WaxSim.build/waxsim-own-target-headers.hmap +0 -0
- data/ext/WaxSim/build/WaxSim.build/Release/WaxSim.build/waxsim-project-headers.hmap +0 -0
- data/ext/WaxSim/build/WaxSim.build/Release/WaxSim.build/waxsim.hmap +0 -0
- data/ext/WaxSim/iPhoneSimulatorRemoteClient/iPhoneSimulatorRemoteClient.h +0 -126
- data/ext/iCuke/sdk3.1/Rakefile +0 -20
- data/ext/iCuke/sdk3.1/Viewer.m +0 -203
- data/ext/iCuke/sdk3.1/iCukeHTTPServer.m +0 -365
- data/ext/iCuke/sdk4.0/DefaultsResponse.h +0 -5
- data/ext/iCuke/sdk4.0/DefaultsResponse.m +0 -66
- data/ext/iCuke/sdk4.0/EventResponse.h +0 -5
- data/ext/iCuke/sdk4.0/EventResponse.m +0 -130
- data/ext/iCuke/sdk4.0/ModuleResponse.h +0 -5
- data/ext/iCuke/sdk4.0/ModuleResponse.m +0 -76
- data/ext/iCuke/sdk4.0/QuitResponse.h +0 -5
- data/ext/iCuke/sdk4.0/QuitResponse.m +0 -23
- data/ext/iCuke/sdk4.0/Rakefile +0 -20
- data/ext/iCuke/sdk4.0/Recorder.h +0 -17
- data/ext/iCuke/sdk4.0/Recorder.m +0 -90
- data/ext/iCuke/sdk4.0/RecorderResponse.h +0 -6
- data/ext/iCuke/sdk4.0/RecorderResponse.m +0 -68
- data/ext/iCuke/sdk4.0/SynthesizeSingleton.h +0 -68
- data/ext/iCuke/sdk4.0/ViewResponse.h +0 -5
- data/ext/iCuke/sdk4.0/ViewResponse.m +0 -84
- data/ext/iCuke/sdk4.0/Viewer.h +0 -8
- data/ext/iCuke/sdk4.0/iCukeHTTPResponseHandler.h +0 -50
- data/ext/iCuke/sdk4.0/iCukeHTTPResponseHandler.m +0 -381
- data/ext/iCuke/sdk4.0/iCukeHTTPServer.h +0 -53
- data/ext/iCuke/sdk4.0/iCukeServer.h +0 -14
- data/ext/iCuke/sdk4.0/iCukeServer.m +0 -65
- data/ext/iCuke/sdk4.0/json/JSON.h +0 -50
- data/ext/iCuke/sdk4.0/json/NSObject+SBJSON.h +0 -68
- data/ext/iCuke/sdk4.0/json/NSObject+SBJSON.m +0 -53
- data/ext/iCuke/sdk4.0/json/NSString+SBJSON.h +0 -58
- data/ext/iCuke/sdk4.0/json/NSString+SBJSON.m +0 -55
- data/ext/iCuke/sdk4.0/json/SBJSON.h +0 -75
- data/ext/iCuke/sdk4.0/json/SBJSON.m +0 -212
- data/ext/iCuke/sdk4.0/json/SBJsonBase.h +0 -86
- data/ext/iCuke/sdk4.0/json/SBJsonBase.m +0 -78
- data/ext/iCuke/sdk4.0/json/SBJsonParser.h +0 -87
- data/ext/iCuke/sdk4.0/json/SBJsonParser.m +0 -475
- data/ext/iCuke/sdk4.0/json/SBJsonWriter.h +0 -129
- data/ext/iCuke/sdk4.0/json/SBJsonWriter.m +0 -228
data/.gitmodules
CHANGED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
background_process (1.2)
|
5
|
+
builder (3.0.0)
|
6
|
+
crack (0.1.8)
|
7
|
+
cucumber (0.10.2)
|
8
|
+
builder (>= 2.1.2)
|
9
|
+
diff-lcs (>= 1.1.2)
|
10
|
+
gherkin (>= 2.3.5)
|
11
|
+
json (>= 1.4.6)
|
12
|
+
term-ansicolor (>= 1.0.5)
|
13
|
+
diff-lcs (1.1.2)
|
14
|
+
gherkin (2.3.6)
|
15
|
+
json (>= 1.4.6)
|
16
|
+
git (1.2.5)
|
17
|
+
httparty (0.7.7)
|
18
|
+
crack (= 0.1.8)
|
19
|
+
jeweler (1.5.2)
|
20
|
+
bundler (~> 1.0.0)
|
21
|
+
git (>= 1.2.5)
|
22
|
+
rake
|
23
|
+
json (1.5.1)
|
24
|
+
nokogiri (1.4.4)
|
25
|
+
rake (0.8.7)
|
26
|
+
rspec (1.3.2)
|
27
|
+
sandbox (0.1.1)
|
28
|
+
term-ansicolor (1.0.5)
|
29
|
+
|
30
|
+
PLATFORMS
|
31
|
+
ruby
|
32
|
+
|
33
|
+
DEPENDENCIES
|
34
|
+
background_process
|
35
|
+
cucumber
|
36
|
+
httparty
|
37
|
+
jeweler
|
38
|
+
nokogiri
|
39
|
+
rake
|
40
|
+
rspec (< 2.0.0)
|
41
|
+
sandbox
|
data/README.markdown
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
iCuke
|
2
|
+
=====
|
3
|
+
|
4
|
+
iCuke allows you to test an iPhone application with cucumber. It provides a selection of step definitions similar to
|
5
|
+
those provided for testing web applications.
|
6
|
+
|
7
|
+
Usage
|
8
|
+
-----
|
9
|
+
|
10
|
+
Install the gem, require it, and extend your cucumber World object with
|
11
|
+
the iCuke step definitions, in a cucumber support file:
|
12
|
+
|
13
|
+
require 'icuke/cucumber'
|
14
|
+
World(ICukeWorld)
|
15
|
+
|
16
|
+
Write some scenarios like:
|
17
|
+
|
18
|
+
Background:
|
19
|
+
Given "iCuke" from "app/iCuke/iCuke.xcodeproj" is loaded in the simulator
|
20
|
+
|
21
|
+
Scenario: User views the About screen
|
22
|
+
When I tap "About"
|
23
|
+
Then I should see "Author:"
|
24
|
+
|
25
|
+
The cucumber steps provided by iCuke are documented [here](http://eraserhead.net/icuke/rdoc/files/lib/icuke_world_rb.html).
|
26
|
+
|
27
|
+
How it works
|
28
|
+
------------
|
29
|
+
|
30
|
+
iCuke launches your application into the iPhone Simulator. A preload library is used to add a HTTP server into your
|
31
|
+
application.
|
32
|
+
|
33
|
+
The HTTP server allows us to see an XML version of the iPhone's screen, and to emulate taps/swipes etc.
|
34
|
+
|
35
|
+
iCuke should not require any code changes to your application to work, however, it relies on accessibility information to function sensibly. If your accessibility information is not accurate, iCuke may not work as expected.
|
36
|
+
|
37
|
+
Troubleshooting
|
38
|
+
---------------
|
39
|
+
|
40
|
+
iCuke needs to be able to find products in your build product's directory. In Xcode 4, you must either enable the "Place build products in locations specified by targets" option (available in the "Locations" tab of the preferences dialog), or build your project with the "xcodebuild" tool.
|
41
|
+
|
42
|
+
Additionally, if you've configured a non-standard location for the build products, iCuke may not be able to find the app.
|
43
|
+
|
44
|
+
If iCuke cannot find the app, you will receive a timeout error when running the Cucumber steps.
|
45
|
+
|
46
|
+
Compatibility Mode
|
47
|
+
------------------
|
48
|
+
|
49
|
+
By default iCuke adds methods to the World object in which cucumber scenarios run.
|
50
|
+
|
51
|
+
This makes it easy to do things like this in your step definitions:
|
52
|
+
|
53
|
+
Given /^the user is logged in$/ do
|
54
|
+
type "username", "test_user"
|
55
|
+
type "password", "test_password"
|
56
|
+
end
|
57
|
+
|
58
|
+
In adding things to the World object, however, you may end up stomping on methods that come from other places. For example, Capybara defines a #drag method for the World object, and so does ICuke. This makes it impossbile to use them together. Another example is the #tap method in ICuke which conflicts with Ruby 1.9.X's Object#tap method.
|
59
|
+
|
60
|
+
In order to solve this instead of:
|
61
|
+
|
62
|
+
require 'icuke/cucumber'
|
63
|
+
World(ICukeWorld)
|
64
|
+
|
65
|
+
do
|
66
|
+
|
67
|
+
require 'icuke/cucumber_compat'
|
68
|
+
World(ICukeWorld)
|
69
|
+
|
70
|
+
By doing this each of the methods provided by the api will be scoped to an icuke_driver object. #tap becomes icuke_driver.tap, #drag becomes icuke_driver.drag, #type becomes icuke_driver.type etc. The example above would become:
|
71
|
+
|
72
|
+
Given /^the user is logged in$/ do
|
73
|
+
icuke_driver.type "username", "test_user"
|
74
|
+
icuke_driver.type "password", "test_password"
|
75
|
+
end
|
76
|
+
|
77
|
+
Bugs
|
78
|
+
----
|
79
|
+
|
80
|
+
iCuke does not support testing applications on real devices, because I don't know of a way get a preload library to
|
81
|
+
load on the device.
|
82
|
+
|
83
|
+
iCuke does not support pinches yet. They'll be here soon!
|
84
|
+
|
85
|
+
iCuke compiles against the latest 3.1 and 4.0 SDKs it can find. Compiling against 3.2 is not currently supported as Apple have released two versions with different ABIs.
|
86
|
+
|
87
|
+
Future development
|
88
|
+
------------------
|
89
|
+
|
90
|
+
The initial development of iCuke was sponsored by Unboxed Consulting. That sponsorship has now ended. In order to help support the future development of iCuke please consider donating.
|
91
|
+
|
92
|
+
<a href='http://www.pledgie.com/campaigns/13697'><img alt='Click here to lend your support to: iCuke and make a donation at www.pledgie.com !' src='http://www.pledgie.com/campaigns/13697.png?skin_name=chrome' border='0' /></a>
|
93
|
+
|
94
|
+
Contributors
|
95
|
+
------------
|
96
|
+
|
97
|
+
* Nigel Taylor
|
98
|
+
* Aslak Hellesøy
|
99
|
+
* Dominic Baggott
|
100
|
+
* Jeff Morgan
|
101
|
+
* Luke Redpath
|
102
|
+
* Grant McInnes
|
103
|
+
|
104
|
+
Thanks
|
105
|
+
------
|
106
|
+
|
107
|
+
Thanks go to the people who's work iCuke is based on:
|
108
|
+
|
109
|
+
* Matt Gallagher
|
110
|
+
* Ian Dees
|
111
|
+
* Felipe Barreto
|
112
|
+
|
113
|
+
Note on Patches/Pull Requests
|
114
|
+
-----------------------------
|
115
|
+
|
116
|
+
* Fork the project.
|
117
|
+
* Make your feature addition or bug fix.
|
118
|
+
* Add tests for it. This is important so I don't break it in a future version unintentionally. Please cover step definitions with cucumber features and logic with specs.
|
119
|
+
* Commit, do not mess with rakefile, version, or history.
|
120
|
+
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
121
|
+
* Send me a pull request. Bonus points for topic branches.
|
122
|
+
|
123
|
+
Copyright
|
124
|
+
---------
|
125
|
+
|
126
|
+
Copyright (c) 2010 Unboxed Consulting. See LICENSE for details.
|
data/Rakefile
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
2
10
|
require 'rake'
|
3
|
-
require 'lib/icuke/sdk'
|
11
|
+
require './lib/icuke/sdk'
|
4
12
|
|
5
13
|
begin
|
6
14
|
require 'jeweler'
|
@@ -8,18 +16,15 @@ begin
|
|
8
16
|
gem.name = "iCuke"
|
9
17
|
gem.summary = %Q{Cucumber support for iPhone applications}
|
10
18
|
gem.description = %Q{Cucumber support for iPhone applications}
|
11
|
-
gem.email = "
|
12
|
-
gem.homepage = "http://github.com/
|
19
|
+
gem.email = "jason.felice@bluefroggaming.com"
|
20
|
+
gem.homepage = "http://github.com/BlueFrogGaming/iCuke"
|
13
21
|
gem.authors = ["Rob Holland"]
|
14
22
|
gem.add_dependency "cucumber", ">= 0"
|
15
23
|
gem.add_dependency "httparty", ">= 0"
|
16
24
|
gem.add_dependency "nokogiri", ">= 0"
|
25
|
+
gem.add_dependency "rake", ">= 0"
|
17
26
|
gem.add_dependency "background_process"
|
18
27
|
gem.extensions = ['ext/Rakefile']
|
19
|
-
gem.files += ['ext/bin/waxsim']
|
20
|
-
gem.files += ['ext/iCuke/libicuke*.dylib']
|
21
|
-
gem.files += ['ext/WaxSim/**/*']
|
22
|
-
gem.files -= ['ext/WaxSim/build']
|
23
28
|
end
|
24
29
|
Jeweler::GemcutterTasks.new
|
25
30
|
rescue LoadError
|
@@ -27,29 +32,46 @@ rescue LoadError
|
|
27
32
|
end
|
28
33
|
|
29
34
|
file 'app/build/Debug-iphonesimulator/Universal.app/Universal' do
|
35
|
+
require 'lib/icuke/sdk'
|
30
36
|
ICuke::SDK.use_latest
|
31
37
|
sh "cd app && xcodebuild -target Universal -configuration Debug -sdk #{ICuke::SDK.fullname}"
|
32
38
|
end
|
33
39
|
task :app => 'app/build/Debug-iphonesimulator/Universal.app/Universal'
|
34
|
-
task :features => :app
|
35
40
|
|
36
41
|
task :lib do
|
37
|
-
sh 'cd ext
|
42
|
+
sh 'cd ext && rake'
|
43
|
+
end
|
44
|
+
|
45
|
+
task :clean do
|
46
|
+
sh 'cd ext && rake clean'
|
38
47
|
end
|
39
48
|
|
40
49
|
begin
|
41
50
|
require 'cucumber/rake/task'
|
42
51
|
Cucumber::Rake::Task.new(:features)
|
43
52
|
|
44
|
-
task :features => :
|
45
|
-
task :features => [:app, :lib]
|
53
|
+
task :features => [:lib, :app]
|
46
54
|
rescue LoadError
|
47
55
|
task :features do
|
48
56
|
abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
|
49
57
|
end
|
50
58
|
end
|
51
59
|
|
52
|
-
|
60
|
+
begin
|
61
|
+
require 'spec/rake/spectask'
|
62
|
+
|
63
|
+
desc "Run all examples"
|
64
|
+
Spec::Rake::SpecTask.new(:spec) do |t|
|
65
|
+
t.spec_files = FileList['spec/**/*.rb']
|
66
|
+
end
|
67
|
+
rescue LoadError
|
68
|
+
desc "Run all examples (not available)"
|
69
|
+
task :spec do
|
70
|
+
abort "Rspec is not available. In order to run specs, you must: sudo gem install rspec"
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
task :default => [:spec, :features]
|
53
75
|
|
54
76
|
require 'rake/rdoctask'
|
55
77
|
Rake::RDocTask.new do |rdoc|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.4
|
data/bin/icuke
CHANGED
@@ -6,22 +6,24 @@ base = File.expand_path(ARGV[0])
|
|
6
6
|
FileUtils.mkdir_p(File.join(base, 'features', 'support'))
|
7
7
|
File.open(File.join(base, 'features', 'support', 'env.rb'), 'w') do |f|
|
8
8
|
f.puts "require 'icuke/cucumber'"
|
9
|
+
f.puts "World(ICukeWorld)"
|
9
10
|
end
|
10
11
|
File.open(File.join(base, 'features', 'example.feature'), 'w') do |f|
|
11
12
|
f.puts <<-EOS
|
12
|
-
Feature:
|
13
|
-
In order
|
14
|
-
As
|
15
|
-
I want to
|
13
|
+
Feature: iPhone integration tests
|
14
|
+
In order to test my iphone application
|
15
|
+
As a developer
|
16
|
+
I want cucumber to be able to drive the simulator
|
16
17
|
|
17
18
|
Background:
|
18
|
-
Given "
|
19
|
+
Given "Universal.xcodeproj" is loaded in the iphone simulator
|
19
20
|
|
20
21
|
Scenario:
|
21
|
-
When I tap "
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
Then I should see "
|
22
|
+
When I tap "Show Test Modal"
|
23
|
+
Then I should see "Lorem ipsum dolor"
|
24
|
+
But I should not see "Fusce sem nisi"
|
25
|
+
When I scroll down to "Fusce sem nisi"
|
26
|
+
Then I should see "Fusce sem nisi"
|
27
|
+
But I should not see "Lorem ipsum dolor"
|
26
28
|
EOS
|
27
29
|
end
|
data/ext/Rakefile
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
task :install do
|
2
|
+
sh "cd .. && git submodule init"
|
3
|
+
sh "cd .. && git submodule update"
|
2
4
|
sh "cd WaxSim && xcodebuild install DSTROOT=../../ INSTALL_PATH=/ext/bin"
|
3
5
|
sh "cd iCuke && rake"
|
4
6
|
end
|
5
7
|
|
8
|
+
task :clean do
|
9
|
+
sh "cd iCuke && rake clean"
|
10
|
+
end
|
11
|
+
|
6
12
|
task :default => :install
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/ext/iCuke/Rakefile
CHANGED
@@ -1,19 +1,20 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), '..', '..', 'lib', 'icuke', 'sdk')
|
2
|
+
require 'rake/clean'
|
2
3
|
|
3
|
-
|
4
|
+
version = '4.3'
|
5
|
+
ICuke::SDK.use_latest(version)
|
4
6
|
|
5
|
-
|
6
|
-
|
7
|
-
puts "Note: iCuke does not currently support version #{sdk} of the iPhone SDK, skipping"
|
8
|
-
next
|
9
|
-
end
|
10
|
-
|
11
|
-
task :install do
|
12
|
-
sh "cd sdk#{sdk} && rake"
|
13
|
-
end
|
14
|
-
task :clean do
|
15
|
-
sh "cd sdk#{sdk} && rake clean"
|
16
|
-
end
|
7
|
+
rule '.o' => '.m' do |o|
|
8
|
+
sh "#{ICuke::SDK.gcc} -c -o #{o.name} #{o.source}"
|
17
9
|
end
|
18
10
|
|
11
|
+
CLEAN.include('**/*.o')
|
12
|
+
|
13
|
+
file ICuke::SDK.dylib => FileList['**/*.m'].ext('.o') do |t|
|
14
|
+
sh "#{ICuke::SDK.ld} -dynamiclib -o #{t.name} -framework Foundation -framework GraphicsServices -framework UIKit -framework CFNetwork -framework AXRuntime #{t.prerequisites.join(' ')}"
|
15
|
+
end
|
16
|
+
|
17
|
+
CLEAN.include("../#{ICuke::SDK.dylib}")
|
18
|
+
|
19
|
+
task :install => ICuke::SDK.dylib
|
19
20
|
task :default => :install
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -194,7 +194,8 @@ SYNTHESIZE_SINGLETON_FOR_CLASS(iCukeHTTPServer);
|
|
194
194
|
|
195
195
|
self.state = SERVER_STATE_RUNNING;
|
196
196
|
|
197
|
-
|
197
|
+
BOOL frameworkSupports = &UIApplicationDidEnterBackgroundNotification != NULL;
|
198
|
+
if (frameworkSupports) {
|
198
199
|
[[NSNotificationCenter defaultCenter]
|
199
200
|
addObserver:self
|
200
201
|
selector:@selector(applicationDidEnterBackground:)
|
@@ -272,7 +273,8 @@ SYNTHESIZE_SINGLETON_FOR_CLASS(iCukeHTTPServer);
|
|
272
273
|
|
273
274
|
self.state = SERVER_STATE_IDLE;
|
274
275
|
|
275
|
-
|
276
|
+
BOOL frameworkSupports = &UIApplicationDidEnterBackgroundNotification != NULL;
|
277
|
+
if (frameworkSupports) {
|
276
278
|
[[NSNotificationCenter defaultCenter]
|
277
279
|
removeObserver:self
|
278
280
|
name:UIApplicationDidEnterBackgroundNotification
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|