From 1570391c0cd04f15226fb069a2d1c641e49c5ac6 Mon Sep 17 00:00:00 2001 From: Rob Holland Date: Wed, 30 Jun 2010 11:02:50 +0100 Subject: [PATCH 1/2] Rakefile shuffle to make rake features work in a git checkout. --- Rakefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index b0f3c2b..ef95c6b 100644 --- a/Rakefile +++ b/Rakefile @@ -32,10 +32,9 @@ file 'app/build/Debug-iphonesimulator/Universal.app/Universal' do sh "cd app && xcodebuild -target Universal -configuration Debug -sdk #{ICuke::SDK.fullname}" end task :app => 'app/build/Debug-iphonesimulator/Universal.app/Universal' -task :features => :app task :lib do - sh 'cd ext/iCuke && rake' + sh 'cd ext && rake' end begin @@ -43,7 +42,7 @@ begin Cucumber::Rake::Task.new(:features) task :features => :check_dependencies - task :features => [:app, :lib] + task :features => [:lib, :app] rescue LoadError task :features do abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber" From 3a4bd855d0717a8d91247f0a2ddebb3971985d8a Mon Sep 17 00:00:00 2001 From: Grant McInnes Date: Tue, 28 Sep 2010 16:28:46 -0400 Subject: [PATCH 2/2] Fix conflicts with integration branch. --- lib/icuke/cucumber.rb | 3 +++ lib/icuke/simulator_driver.rb | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/lib/icuke/cucumber.rb b/lib/icuke/cucumber.rb index f781ce5..cae0459 100644 --- a/lib/icuke/cucumber.rb +++ b/lib/icuke/cucumber.rb @@ -65,6 +65,9 @@ def configuration simulator_driver.tap(label) end +When /^I tap (\d+),(\d+)$/ do |x,y| + simulator_driver.tap_at_point(x.to_i, y.to_i) +end When /^I type "([^\"]*)" in "([^\"]*)"$/ do |text, textfield| simulator_driver.type(textfield, text) end diff --git a/lib/icuke/simulator_driver.rb b/lib/icuke/simulator_driver.rb index ca86ee5..43c080b 100644 --- a/lib/icuke/simulator_driver.rb +++ b/lib/icuke/simulator_driver.rb @@ -45,6 +45,15 @@ def response def record @simulator.record end + + def tap_at_point(x, y, options={}) + options = { + :pause => true + }.merge(options) + @simulator.fire_event(Tap.new(x,y,options)) + sleep(options[:pause] ? 2 : 0.2) + refresh + end def tap(label, options = {}, &block) options = {