├── lib ├── capybara-touch.rb └── capybara │ ├── touch │ ├── version.rb │ ├── errors.rb │ ├── socket_debugger.rb │ ├── matchers.rb │ └── cookie_jar.rb │ └── touch.rb ├── Gemfile ├── ios ├── Podfile ├── Specs │ ├── Frameworks │ │ └── Cedar-iOS.framework │ │ │ ├── Cedar-iOS │ │ │ ├── Headers │ │ │ ├── Cedar.h │ │ │ ├── Cedar-iOS.h │ │ │ ├── ComparatorsBase.h │ │ │ ├── CDRColorizedReporter.h │ │ │ ├── CedarComparators.h │ │ │ ├── CedarStringifiers.h │ │ │ ├── CDRSlowTestStatistics.h │ │ │ ├── CDRExampleReporterViewController.h │ │ │ ├── CDRClassFake.h │ │ │ ├── CDRExampleReporter.h │ │ │ ├── CDRFunctions.h │ │ │ ├── CedarDoubles.h │ │ │ ├── CDRExampleDetailsViewController.h │ │ │ ├── CDRExampleParent.h │ │ │ ├── CDRProtocolFake.h │ │ │ ├── CDRFake.h │ │ │ ├── CedarMatchers.h │ │ │ ├── CDRSpyInfo.h │ │ │ ├── CDRSpy.h │ │ │ ├── SpecHelper.h │ │ │ ├── UIGeometryStringifiers.h │ │ │ ├── BeEmpty.h │ │ │ ├── CedarDouble.h │ │ │ ├── CedarDoubleImpl.h │ │ │ ├── CedarApplicationDelegate.h │ │ │ ├── ReturnValue.h │ │ │ ├── AnyInstanceArgument.h │ │ │ ├── AnyArgument.h │ │ │ ├── BeTruthy.h │ │ │ ├── CDRSpecFailure.h │ │ │ ├── ShouldSyntax.h │ │ │ ├── Argument.h │ │ │ ├── CDRSharedExampleGroupPool.h │ │ │ ├── UIGeometryCompareEqual.h │ │ │ ├── CDRExampleBase.h │ │ │ ├── StringifiersBase.h │ │ │ ├── Contain.h │ │ │ ├── HaveReceived.h │ │ │ ├── InvocationMatcher.h │ │ │ ├── BeNil.h │ │ │ ├── RaiseException.h │ │ │ ├── BeSameInstanceAs.h │ │ │ ├── StringifiersContainer.h │ │ │ ├── BeGreaterThan.h │ │ │ ├── BeLessThan.h │ │ │ ├── BeLTE.h │ │ │ ├── Base.h │ │ │ ├── BeGTE.h │ │ │ ├── CDRSpec.h │ │ │ └── BeInstanceOf.h │ │ │ └── Versions │ │ │ ├── A │ │ │ ├── Headers │ │ │ │ ├── Cedar.h │ │ │ │ ├── Cedar-iOS.h │ │ │ │ ├── ComparatorsBase.h │ │ │ │ ├── CDRColorizedReporter.h │ │ │ │ ├── CedarComparators.h │ │ │ │ ├── CedarStringifiers.h │ │ │ │ ├── CDRSlowTestStatistics.h │ │ │ │ ├── CDRExampleReporterViewController.h │ │ │ │ ├── CDRClassFake.h │ │ │ │ ├── CDRExampleReporter.h │ │ │ │ ├── CDRFunctions.h │ │ │ │ ├── CedarDoubles.h │ │ │ │ ├── CDRExampleDetailsViewController.h │ │ │ │ ├── CDRExampleParent.h │ │ │ │ ├── CDRProtocolFake.h │ │ │ │ ├── CDRFake.h │ │ │ │ ├── CedarMatchers.h │ │ │ │ ├── CDRSpyInfo.h │ │ │ │ ├── CDRSpy.h │ │ │ │ ├── SpecHelper.h │ │ │ │ ├── UIGeometryStringifiers.h │ │ │ │ ├── BeEmpty.h │ │ │ │ ├── CedarDouble.h │ │ │ │ ├── CedarDoubleImpl.h │ │ │ │ ├── CedarApplicationDelegate.h │ │ │ │ ├── ReturnValue.h │ │ │ │ ├── AnyInstanceArgument.h │ │ │ │ ├── AnyArgument.h │ │ │ │ ├── BeTruthy.h │ │ │ │ ├── CDRSpecFailure.h │ │ │ │ ├── ShouldSyntax.h │ │ │ │ ├── Argument.h │ │ │ │ ├── CDRSharedExampleGroupPool.h │ │ │ │ ├── UIGeometryCompareEqual.h │ │ │ │ ├── CDRExampleBase.h │ │ │ │ ├── StringifiersBase.h │ │ │ │ ├── Contain.h │ │ │ │ ├── HaveReceived.h │ │ │ │ ├── InvocationMatcher.h │ │ │ │ ├── BeNil.h │ │ │ │ ├── RaiseException.h │ │ │ │ ├── BeSameInstanceAs.h │ │ │ │ ├── StringifiersContainer.h │ │ │ │ ├── BeGreaterThan.h │ │ │ │ ├── BeLessThan.h │ │ │ │ ├── BeLTE.h │ │ │ │ ├── Base.h │ │ │ │ ├── BeGTE.h │ │ │ │ ├── CDRSpec.h │ │ │ │ └── BeInstanceOf.h │ │ │ └── Cedar-iOS │ │ │ └── Current │ │ │ ├── Headers │ │ │ ├── Cedar.h │ │ │ ├── Cedar-iOS.h │ │ │ ├── ComparatorsBase.h │ │ │ ├── CDRColorizedReporter.h │ │ │ ├── CedarComparators.h │ │ │ ├── CedarStringifiers.h │ │ │ ├── CDRSlowTestStatistics.h │ │ │ ├── CDRExampleReporterViewController.h │ │ │ ├── CDRClassFake.h │ │ │ ├── CDRExampleReporter.h │ │ │ ├── CDRFunctions.h │ │ │ ├── CedarDoubles.h │ │ │ ├── CDRExampleDetailsViewController.h │ │ │ ├── CDRExampleParent.h │ │ │ ├── CDRProtocolFake.h │ │ │ ├── CDRFake.h │ │ │ ├── CedarMatchers.h │ │ │ ├── CDRSpyInfo.h │ │ │ ├── CDRSpy.h │ │ │ ├── SpecHelper.h │ │ │ ├── UIGeometryStringifiers.h │ │ │ ├── BeEmpty.h │ │ │ ├── CedarDouble.h │ │ │ ├── CedarDoubleImpl.h │ │ │ ├── CedarApplicationDelegate.h │ │ │ ├── ReturnValue.h │ │ │ ├── AnyInstanceArgument.h │ │ │ ├── AnyArgument.h │ │ │ ├── BeTruthy.h │ │ │ ├── CDRSpecFailure.h │ │ │ ├── ShouldSyntax.h │ │ │ ├── Argument.h │ │ │ ├── CDRSharedExampleGroupPool.h │ │ │ ├── UIGeometryCompareEqual.h │ │ │ ├── CDRExampleBase.h │ │ │ ├── StringifiersBase.h │ │ │ ├── Contain.h │ │ │ ├── HaveReceived.h │ │ │ ├── InvocationMatcher.h │ │ │ ├── BeNil.h │ │ │ ├── RaiseException.h │ │ │ ├── BeSameInstanceAs.h │ │ │ ├── StringifiersContainer.h │ │ │ ├── BeGreaterThan.h │ │ │ ├── BeLessThan.h │ │ │ ├── BeLTE.h │ │ │ ├── Base.h │ │ │ ├── BeGTE.h │ │ │ ├── CDRSpec.h │ │ │ └── BeInstanceOf.h │ │ │ └── Cedar-iOS │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── Extensions │ │ ├── CTCapybaraClient+Spec.m │ │ └── CTCapybaraClient+Spec.h │ ├── Specs-Prefix.pch │ ├── Specs-Info.plist │ └── UI │ │ └── CTViewControllerSpec.mm ├── Pods │ ├── Headers │ │ └── CocoaAsyncSocket │ │ │ ├── AsyncSocket.h │ │ │ ├── GCDAsyncSocket.h │ │ │ ├── AsyncUdpSocket.h │ │ │ └── GCDAsyncUdpSocket.h │ ├── BuildHeaders │ │ └── CocoaAsyncSocket │ │ │ ├── AsyncSocket.h │ │ │ ├── GCDAsyncSocket.h │ │ │ ├── AsyncUdpSocket.h │ │ │ └── GCDAsyncUdpSocket.h │ ├── Pods-CocoaAsyncSocket.xcconfig │ ├── Pods-CocoaAsyncSocket-prefix.pch │ ├── Pods-dummy.m │ ├── Pods-CocoaAsyncSocket-dummy.m │ ├── Manifest.lock │ ├── Pods.xcconfig │ ├── Pods-CocoaAsyncSocket-Private.xcconfig │ ├── Pods-acknowledgements.markdown │ ├── Pods-environment.h │ └── Pods-acknowledgements.plist ├── capybara-touch │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── Default.png │ ├── Default@2x.png │ ├── Default-568h@2x.png │ ├── Extensions │ │ ├── NSArray+Enumerable.h │ │ ├── UIFakeTouch.h │ │ ├── UIFakeKeypress.h │ │ ├── NSArray+Enumerable.m │ │ └── UIFakeKeypress.m │ ├── CTViewController.h │ ├── Private Frameworks │ │ ├── GraphicsServices.framework │ │ │ ├── CDStructures.h │ │ │ └── _UIFontExtraData.h │ │ └── GraphicsServices │ │ │ ├── GraphicsServices.h │ │ │ ├── GSBase.h │ │ │ ├── GSWindow.h │ │ │ ├── GSStatusBar.h │ │ │ └── GSHiccup.h │ ├── Domain │ │ └── CTInterface.h │ ├── CTAppDelegate.h │ ├── capybara-touch-Prefix.pch │ ├── main.m │ ├── CTAppDelegate.m │ ├── CTViewController.m │ ├── CTCapybaraClient.h │ └── capybara-touch-Info.plist ├── build │ └── .DS_Store ├── run.sh ├── capybara-touch.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── capybara-touch.xccheckout ├── Podfile.lock ├── capybara-touch.xcodeproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata └── Rakefile ├── .gitignore ├── capybara-touch.gemspec ├── LICENSE ├── spec ├── spec_helper.rb └── support │ └── app_runner.rb ├── Gemfile.lock └── Rakefile /lib/capybara-touch.rb: -------------------------------------------------------------------------------- 1 | require "capybara/touch" 2 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gemspec 4 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '5.0' 2 | 3 | pod 'CocoaAsyncSocket' 4 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Cedar-iOS: -------------------------------------------------------------------------------- 1 | Versions/Current/Cedar-iOS -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/Cedar.h: -------------------------------------------------------------------------------- 1 | #import "CDRFunctions.h" 2 | -------------------------------------------------------------------------------- /ios/Pods/Headers/CocoaAsyncSocket/AsyncSocket.h: -------------------------------------------------------------------------------- 1 | ../../CocoaAsyncSocket/RunLoop/AsyncSocket.h -------------------------------------------------------------------------------- /ios/Pods/Headers/CocoaAsyncSocket/GCDAsyncSocket.h: -------------------------------------------------------------------------------- 1 | ../../CocoaAsyncSocket/GCD/GCDAsyncSocket.h -------------------------------------------------------------------------------- /ios/Specs/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ios/Pods/BuildHeaders/CocoaAsyncSocket/AsyncSocket.h: -------------------------------------------------------------------------------- 1 | ../../CocoaAsyncSocket/RunLoop/AsyncSocket.h -------------------------------------------------------------------------------- /ios/Pods/BuildHeaders/CocoaAsyncSocket/GCDAsyncSocket.h: -------------------------------------------------------------------------------- 1 | ../../CocoaAsyncSocket/GCD/GCDAsyncSocket.h -------------------------------------------------------------------------------- /ios/Pods/Headers/CocoaAsyncSocket/AsyncUdpSocket.h: -------------------------------------------------------------------------------- 1 | ../../CocoaAsyncSocket/RunLoop/AsyncUdpSocket.h -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/Cedar.h: -------------------------------------------------------------------------------- 1 | #import "CDRFunctions.h" 2 | -------------------------------------------------------------------------------- /ios/capybara-touch/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ios/Pods/BuildHeaders/CocoaAsyncSocket/AsyncUdpSocket.h: -------------------------------------------------------------------------------- 1 | ../../CocoaAsyncSocket/RunLoop/AsyncUdpSocket.h -------------------------------------------------------------------------------- /ios/Pods/Headers/CocoaAsyncSocket/GCDAsyncUdpSocket.h: -------------------------------------------------------------------------------- 1 | ../../CocoaAsyncSocket/GCD/GCDAsyncUdpSocket.h -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/Cedar.h: -------------------------------------------------------------------------------- 1 | #import "CDRFunctions.h" 2 | -------------------------------------------------------------------------------- /ios/build/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazerwalker/capybara-touch/HEAD/ios/build/.DS_Store -------------------------------------------------------------------------------- /ios/Pods/BuildHeaders/CocoaAsyncSocket/GCDAsyncUdpSocket.h: -------------------------------------------------------------------------------- 1 | ../../CocoaAsyncSocket/GCD/GCDAsyncUdpSocket.h -------------------------------------------------------------------------------- /ios/Pods/Pods-CocoaAsyncSocket.xcconfig: -------------------------------------------------------------------------------- 1 | PODS_COCOAASYNCSOCKET_OTHER_LDFLAGS = -framework CFNetwork -framework Security -------------------------------------------------------------------------------- /ios/capybara-touch/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazerwalker/capybara-touch/HEAD/ios/capybara-touch/Default.png -------------------------------------------------------------------------------- /ios/capybara-touch/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazerwalker/capybara-touch/HEAD/ios/capybara-touch/Default@2x.png -------------------------------------------------------------------------------- /ios/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 3 | DEVICE=$DEVICE cd $DIR && rake run 4 | -------------------------------------------------------------------------------- /ios/Pods/Pods-CocoaAsyncSocket-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-environment.h" 6 | -------------------------------------------------------------------------------- /ios/capybara-touch/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazerwalker/capybara-touch/HEAD/ios/capybara-touch/Default-568h@2x.png -------------------------------------------------------------------------------- /ios/Specs/Extensions/CTCapybaraClient+Spec.m: -------------------------------------------------------------------------------- 1 | #import "CTCapybaraClient+Spec.h" 2 | 3 | @implementation CTCapybaraClient (Spec) 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /ios/Pods/Pods-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods : NSObject 3 | @end 4 | @implementation PodsDummy_Pods 5 | @end 6 | -------------------------------------------------------------------------------- /lib/capybara/touch/version.rb: -------------------------------------------------------------------------------- 1 | module Capybara 2 | module Driver 3 | class Touch 4 | VERSION = '0.0.1'.freeze 5 | end 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /ios/capybara-touch/Extensions/NSArray+Enumerable.h: -------------------------------------------------------------------------------- 1 | @interface NSArray (Enumerable) 2 | 3 | - (NSArray *)map:(id (^)(id obj, NSUInteger idx))block; 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/Cedar-iOS.h: -------------------------------------------------------------------------------- 1 | #import "Cedar.h" 2 | #import "CedarApplicationDelegate.h" 3 | #import "CDRExampleReporterViewController.h" 4 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/Cedar-iOS.h: -------------------------------------------------------------------------------- 1 | #import "Cedar.h" 2 | #import "CedarApplicationDelegate.h" 3 | #import "CDRExampleReporterViewController.h" 4 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Cedar-iOS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazerwalker/capybara-touch/HEAD/ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Cedar-iOS -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/Cedar-iOS.h: -------------------------------------------------------------------------------- 1 | #import "Cedar.h" 2 | #import "CedarApplicationDelegate.h" 3 | #import "CDRExampleReporterViewController.h" 4 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Cedar-iOS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lazerwalker/capybara-touch/HEAD/ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Cedar-iOS -------------------------------------------------------------------------------- /ios/capybara-touch/CTViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface CTViewController : UIViewController 4 | 5 | @property (strong, nonatomic) UIWebView *webView; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /ios/Pods/Pods-CocoaAsyncSocket-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_CocoaAsyncSocket : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_CocoaAsyncSocket 5 | @end 6 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/ComparatorsBase.h: -------------------------------------------------------------------------------- 1 | #import "CompareEqual.h" 2 | #import "CompareGreaterThan.h" 3 | 4 | #if TARGET_OS_IPHONE 5 | #import "UIGeometryCompareEqual.h" 6 | #endif 7 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CDRColorizedReporter.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRDefaultReporter.h" 3 | 4 | @interface CDRColorizedReporter : CDRDefaultReporter 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/ComparatorsBase.h: -------------------------------------------------------------------------------- 1 | #import "CompareEqual.h" 2 | #import "CompareGreaterThan.h" 3 | 4 | #if TARGET_OS_IPHONE 5 | #import "UIGeometryCompareEqual.h" 6 | #endif 7 | -------------------------------------------------------------------------------- /ios/Specs/Extensions/CTCapybaraClient+Spec.h: -------------------------------------------------------------------------------- 1 | #import "CTCapybaraClient.h" 2 | #import "CTInterface.h" 3 | 4 | @interface CTCapybaraClient (Spec) 5 | 6 | @property (strong, nonatomic) CTInterface *interface; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CedarComparators.h: -------------------------------------------------------------------------------- 1 | #import "ComparatorsBase.h" 2 | #import "ComparatorsContainer.h" 3 | 4 | #ifdef CEDAR_CUSTOM_COMPARATORS 5 | #import CEDAR_CUSTOM_COMPARATORS 6 | #endif 7 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/ComparatorsBase.h: -------------------------------------------------------------------------------- 1 | #import "CompareEqual.h" 2 | #import "CompareGreaterThan.h" 3 | 4 | #if TARGET_OS_IPHONE 5 | #import "UIGeometryCompareEqual.h" 6 | #endif 7 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CedarStringifiers.h: -------------------------------------------------------------------------------- 1 | #import "StringifiersBase.h" 2 | #import "StringifiersContainer.h" 3 | 4 | #ifdef CEDAR_CUSTOM_STRINGIFIERS 5 | #import CEDAR_CUSTOM_STRINGIFIERS 6 | #endif 7 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRColorizedReporter.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRDefaultReporter.h" 3 | 4 | @interface CDRColorizedReporter : CDRDefaultReporter 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ios/capybara-touch.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CocoaAsyncSocket (7.3.2) 3 | 4 | DEPENDENCIES: 5 | - CocoaAsyncSocket 6 | 7 | SPEC CHECKSUMS: 8 | CocoaAsyncSocket: 977404129ec8505fee1c3701956b769e3bb10ea7 9 | 10 | COCOAPODS: 0.26.2 11 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CedarComparators.h: -------------------------------------------------------------------------------- 1 | #import "ComparatorsBase.h" 2 | #import "ComparatorsContainer.h" 3 | 4 | #ifdef CEDAR_CUSTOM_COMPARATORS 5 | #import CEDAR_CUSTOM_COMPARATORS 6 | #endif 7 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRColorizedReporter.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRDefaultReporter.h" 3 | 4 | @interface CDRColorizedReporter : CDRDefaultReporter 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ios/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CocoaAsyncSocket (7.3.2) 3 | 4 | DEPENDENCIES: 5 | - CocoaAsyncSocket 6 | 7 | SPEC CHECKSUMS: 8 | CocoaAsyncSocket: 977404129ec8505fee1c3701956b769e3bb10ea7 9 | 10 | COCOAPODS: 0.26.2 11 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CDRSlowTestStatistics.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface CDRSlowTestStatistics : NSObject 4 | 5 | - (void)printStatsForExampleGroups:(NSArray *)groups; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CedarStringifiers.h: -------------------------------------------------------------------------------- 1 | #import "StringifiersBase.h" 2 | #import "StringifiersContainer.h" 3 | 4 | #ifdef CEDAR_CUSTOM_STRINGIFIERS 5 | #import CEDAR_CUSTOM_STRINGIFIERS 6 | #endif 7 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CedarComparators.h: -------------------------------------------------------------------------------- 1 | #import "ComparatorsBase.h" 2 | #import "ComparatorsContainer.h" 3 | 4 | #ifdef CEDAR_CUSTOM_COMPARATORS 5 | #import CEDAR_CUSTOM_COMPARATORS 6 | #endif 7 | -------------------------------------------------------------------------------- /ios/capybara-touch/Private Frameworks/GraphicsServices.framework/CDStructures.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2012 by Steve Nygard. 5 | */ 6 | 7 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CedarStringifiers.h: -------------------------------------------------------------------------------- 1 | #import "StringifiersBase.h" 2 | #import "StringifiersContainer.h" 3 | 4 | #ifdef CEDAR_CUSTOM_STRINGIFIERS 5 | #import CEDAR_CUSTOM_STRINGIFIERS 6 | #endif 7 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRSlowTestStatistics.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface CDRSlowTestStatistics : NSObject 4 | 5 | - (void)printStatsForExampleGroups:(NSArray *)groups; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRSlowTestStatistics.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface CDRSlowTestStatistics : NSObject 4 | 5 | - (void)printStatsForExampleGroups:(NSArray *)groups; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /ios/capybara-touch.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Pods/Pods.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/CocoaAsyncSocket" 3 | OTHER_LDFLAGS = -ObjC -framework CFNetwork -framework Security 4 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CDRExampleReporterViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRExampleReporter.h" 3 | 4 | @interface CDRExampleReporterViewController : UINavigationController { 5 | } 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRExampleReporterViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRExampleReporter.h" 3 | 4 | @interface CDRExampleReporterViewController : UINavigationController { 5 | } 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRExampleReporterViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRExampleReporter.h" 3 | 4 | @interface CDRExampleReporterViewController : UINavigationController { 5 | } 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CDRClassFake.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRFake.h" 3 | #import "CedarDouble.h" 4 | 5 | @interface CDRClassFake : CDRFake 6 | 7 | @end 8 | 9 | id CDR_fake_for(Class klass, bool require_explicit_stubs = true); 10 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRClassFake.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRFake.h" 3 | #import "CedarDouble.h" 4 | 5 | @interface CDRClassFake : CDRFake 6 | 7 | @end 8 | 9 | id CDR_fake_for(Class klass, bool require_explicit_stubs = true); 10 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRClassFake.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRFake.h" 3 | #import "CedarDouble.h" 4 | 5 | @interface CDRClassFake : CDRFake 6 | 7 | @end 8 | 9 | id CDR_fake_for(Class klass, bool require_explicit_stubs = true); 10 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CDRExampleReporter.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol CDRExampleReporter 4 | 5 | - (void)runWillStartWithGroups:(NSArray *)groups andRandomSeed:(unsigned int)seed; 6 | - (void)runDidComplete; 7 | - (int)result; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRExampleReporter.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol CDRExampleReporter 4 | 5 | - (void)runWillStartWithGroups:(NSArray *)groups andRandomSeed:(unsigned int)seed; 6 | - (void)runDidComplete; 7 | - (int)result; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /ios/Specs/Specs-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #import 9 | #import 10 | #import 11 | #endif 12 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRExampleReporter.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol CDRExampleReporter 4 | 5 | - (void)runWillStartWithGroups:(NSArray *)groups andRandomSeed:(unsigned int)seed; 6 | - (void)runDidComplete; 7 | - (int)result; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /ios/capybara-touch/Extensions/UIFakeTouch.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface UIFakeTouch: NSObject 4 | 5 | @property (nonatomic, strong) UIView *view; 6 | @property (nonatomic, assign) CGPoint point; 7 | 8 | - (instancetype)initInView:(UIView *)view point:(CGPoint)point; 9 | - (void)sendTap; 10 | 11 | @end 12 | 13 | 14 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CDRFunctions.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NSArray *CDRReportersFromEnv(const char*defaultReporterClassName); 4 | 5 | int runSpecs(); 6 | int runAllSpecs() __attribute__((deprecated)); 7 | int runSpecsWithCustomExampleReporters(NSArray *reporters); 8 | NSArray *specClassesToRun(); 9 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRFunctions.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NSArray *CDRReportersFromEnv(const char*defaultReporterClassName); 4 | 5 | int runSpecs(); 6 | int runAllSpecs() __attribute__((deprecated)); 7 | int runSpecsWithCustomExampleReporters(NSArray *reporters); 8 | NSArray *specClassesToRun(); 9 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CedarDoubles.h: -------------------------------------------------------------------------------- 1 | #import "CDRSpy.h" 2 | #import "CDRFake.h" 3 | #import "CDRClassFake.h" 4 | #import "CDRProtocolFake.h" 5 | #import "HaveReceived.h" 6 | #import "StubbedMethod.h" 7 | 8 | #import "Argument.h" 9 | #import "AnyArgument.h" 10 | #import "ValueArgument.h" 11 | #import "AnyInstanceArgument.h" 12 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRFunctions.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NSArray *CDRReportersFromEnv(const char*defaultReporterClassName); 4 | 5 | int runSpecs(); 6 | int runAllSpecs() __attribute__((deprecated)); 7 | int runSpecsWithCustomExampleReporters(NSArray *reporters); 8 | NSArray *specClassesToRun(); 9 | -------------------------------------------------------------------------------- /ios/capybara-touch/Domain/CTInterface.h: -------------------------------------------------------------------------------- 1 | #import "CTCapybaraClient.h" 2 | 3 | @interface CTInterface : NSObject 4 | 5 | @property (strong, nonatomic) iddelegate; 6 | 7 | - (void)startWithPort:(NSInteger)port domain:(NSString *)domain; 8 | - (void)sendSuccessMessage; 9 | - (void)sendSuccessMessage:(NSString *)message; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CedarDoubles.h: -------------------------------------------------------------------------------- 1 | #import "CDRSpy.h" 2 | #import "CDRFake.h" 3 | #import "CDRClassFake.h" 4 | #import "CDRProtocolFake.h" 5 | #import "HaveReceived.h" 6 | #import "StubbedMethod.h" 7 | 8 | #import "Argument.h" 9 | #import "AnyArgument.h" 10 | #import "ValueArgument.h" 11 | #import "AnyInstanceArgument.h" 12 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CedarDoubles.h: -------------------------------------------------------------------------------- 1 | #import "CDRSpy.h" 2 | #import "CDRFake.h" 3 | #import "CDRClassFake.h" 4 | #import "CDRProtocolFake.h" 5 | #import "HaveReceived.h" 6 | #import "StubbedMethod.h" 7 | 8 | #import "Argument.h" 9 | #import "AnyArgument.h" 10 | #import "ValueArgument.h" 11 | #import "AnyInstanceArgument.h" 12 | -------------------------------------------------------------------------------- /ios/Pods/Pods-CocoaAsyncSocket-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-CocoaAsyncSocket.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/CocoaAsyncSocket" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/CocoaAsyncSocket" 4 | OTHER_LDFLAGS = -ObjC ${PODS_COCOAASYNCSOCKET_OTHER_LDFLAGS} 5 | PODS_ROOT = ${SRCROOT} -------------------------------------------------------------------------------- /lib/capybara/touch.rb: -------------------------------------------------------------------------------- 1 | require "capybara" 2 | 3 | module Capybara 4 | module Touch 5 | end 6 | end 7 | 8 | require "capybara/touch/driver" 9 | 10 | Capybara.register_driver :iphone do |app| 11 | Capybara::Touch::Driver.new(app, device: :iphone) 12 | end 13 | 14 | Capybara.register_driver :ipad do |app| 15 | Capybara::Touch::Driver.new(app, device: :ipad) 16 | end 17 | -------------------------------------------------------------------------------- /ios/capybara-touch/Extensions/UIFakeKeypress.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIFakeKeypress.h 3 | // capybara-touch 4 | // 5 | // Created by Michael Walker on 10/14/13. 6 | // Copyright (c) 2013 Michael Walker. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | @interface UIFakeKeypress : NSObject 12 | 13 | - (void)sendKeypressForString:(NSString *)string; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CDRExampleDetailsViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class CDRExampleBase; 4 | 5 | @interface CDRExampleDetailsViewController : UIViewController 6 | 7 | @property (nonatomic, assign) UINavigationBar *navigationBar; 8 | @property (nonatomic, assign) UILabel *fullTextLabel, *messageLabel; 9 | 10 | - (id)initWithExample:(CDRExampleBase *)example; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /ios/capybara-touch/CTAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // CTAppDelegate.h 3 | // capybara-touch 4 | // 5 | // Created by Michael Walker on 6/24/13. 6 | // Copyright (c) 2013 Michael Walker. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CTViewController; 12 | 13 | @interface CTAppDelegate : UIResponder 14 | 15 | @property (strong, nonatomic) UIWindow *window; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /ios/capybara-touch/capybara-touch-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'capybara-touch' target in the 'capybara-touch' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_4_0 8 | #warning "This project uses features only available in iOS SDK 4.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRExampleDetailsViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class CDRExampleBase; 4 | 5 | @interface CDRExampleDetailsViewController : UIViewController 6 | 7 | @property (nonatomic, assign) UINavigationBar *navigationBar; 8 | @property (nonatomic, assign) UILabel *fullTextLabel, *messageLabel; 9 | 10 | - (id)initWithExample:(CDRExampleBase *)example; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRExampleDetailsViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class CDRExampleBase; 4 | 5 | @interface CDRExampleDetailsViewController : UIViewController 6 | 7 | @property (nonatomic, assign) UINavigationBar *navigationBar; 8 | @property (nonatomic, assign) UILabel *fullTextLabel, *messageLabel; 9 | 10 | - (id)initWithExample:(CDRExampleBase *)example; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /ios/capybara-touch/Extensions/NSArray+Enumerable.m: -------------------------------------------------------------------------------- 1 | #import "NSArray+Enumerable.h" 2 | 3 | @implementation NSArray (Enumerable) 4 | 5 | - (NSArray *)map:(id (^)(id obj, NSUInteger idx))block { 6 | NSMutableArray *result = [NSMutableArray arrayWithCapacity:[self count]]; 7 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 8 | [result addObject:block(obj, idx)]; 9 | }]; 10 | return result; 11 | } 12 | @end 13 | -------------------------------------------------------------------------------- /ios/capybara-touch/Private Frameworks/GraphicsServices/GraphicsServices.h: -------------------------------------------------------------------------------- 1 | #ifndef GRAPHICS_SERVICES_H 2 | #define GRAPHICS_SERVICES_H 3 | 4 | #include "GSBase.h" 5 | #include "GSColor.h" 6 | #include "GSEvent.h" 7 | #include "GSFont.h" 8 | #include "GSCapability.h" 9 | #include "GSGeometry.h" 10 | #include "GSHeartbeat.h" 11 | #include "GSHiccup.h" 12 | #include "GSMainScreen.h" 13 | #include "GSMaps.h" 14 | #include "GSStatusBar.h" 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /ios/capybara-touch/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // capybara-touch 4 | // 5 | // Created by Michael Walker on 6/24/13. 6 | // Copyright (c) 2013 Michael Walker. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "CTAppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([CTAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CDRExampleParent.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef void (^CDRSpecBlock)(void); 4 | 5 | @protocol CDRExampleParent 6 | 7 | - (BOOL)shouldRun; 8 | 9 | - (void)setUp; 10 | - (CDRSpecBlock)subjectActionBlock; 11 | - (void)tearDown; 12 | 13 | @optional 14 | - (BOOL)hasFullText; 15 | - (NSString *)fullText; 16 | - (NSMutableArray *)fullTextInPieces; 17 | 18 | - (NSUInteger)stackAddress; 19 | @end 20 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CDRProtocolFake.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | #import "CDRFake.h" 4 | 5 | #import 6 | #import 7 | 8 | @interface CDRProtocolFake : CDRFake 9 | 10 | - (id)initWithClass:(Class)klass forProtocol:(Protocol *)protocol requireExplicitStubs:(bool)requireExplicitStubs; 11 | 12 | @end 13 | 14 | id CDR_fake_for(Protocol *protocol, bool require_explicit_stubs = true); 15 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRExampleParent.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef void (^CDRSpecBlock)(void); 4 | 5 | @protocol CDRExampleParent 6 | 7 | - (BOOL)shouldRun; 8 | 9 | - (void)setUp; 10 | - (CDRSpecBlock)subjectActionBlock; 11 | - (void)tearDown; 12 | 13 | @optional 14 | - (BOOL)hasFullText; 15 | - (NSString *)fullText; 16 | - (NSMutableArray *)fullTextInPieces; 17 | 18 | - (NSUInteger)stackAddress; 19 | @end 20 | -------------------------------------------------------------------------------- /ios/Pods/Pods-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## CocoaAsyncSocket 5 | 6 | Public Domain License 7 | 8 | The CocoaAsyncSocket project is in the public domain. 9 | 10 | The original TCP version (AsyncSocket) was created by Dustin Voss in January 2003. 11 | Updated and maintained by Deusty LLC and the Apple development community. 12 | 13 | Generated by CocoaPods - http://cocoapods.org 14 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRProtocolFake.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | #import "CDRFake.h" 4 | 5 | #import 6 | #import 7 | 8 | @interface CDRProtocolFake : CDRFake 9 | 10 | - (id)initWithClass:(Class)klass forProtocol:(Protocol *)protocol requireExplicitStubs:(bool)requireExplicitStubs; 11 | 12 | @end 13 | 14 | id CDR_fake_for(Protocol *protocol, bool require_explicit_stubs = true); 15 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRExampleParent.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef void (^CDRSpecBlock)(void); 4 | 5 | @protocol CDRExampleParent 6 | 7 | - (BOOL)shouldRun; 8 | 9 | - (void)setUp; 10 | - (CDRSpecBlock)subjectActionBlock; 11 | - (void)tearDown; 12 | 13 | @optional 14 | - (BOOL)hasFullText; 15 | - (NSString *)fullText; 16 | - (NSMutableArray *)fullTextInPieces; 17 | 18 | - (NSUInteger)stackAddress; 19 | @end 20 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRProtocolFake.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | #import "CDRFake.h" 4 | 5 | #import 6 | #import 7 | 8 | @interface CDRProtocolFake : CDRFake 9 | 10 | - (id)initWithClass:(Class)klass forProtocol:(Protocol *)protocol requireExplicitStubs:(bool)requireExplicitStubs; 11 | 12 | @end 13 | 14 | id CDR_fake_for(Protocol *protocol, bool require_explicit_stubs = true); 15 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CDRFake.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | 4 | @interface CDRFake : NSObject 5 | 6 | @property (nonatomic, assign) Class klass; 7 | 8 | - (id)initWithClass:(Class)klass requireExplicitStubs:(bool)requireExplicitStubs; 9 | 10 | @end 11 | 12 | #ifndef CEDAR_DOUBLES_COMPATIBILITY_MODE 13 | #define fake_for(x) CDR_fake_for((x)) 14 | #define nice_fake_for(x) CDR_fake_for((x), false) 15 | #endif 16 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRFake.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | 4 | @interface CDRFake : NSObject 5 | 6 | @property (nonatomic, assign) Class klass; 7 | 8 | - (id)initWithClass:(Class)klass requireExplicitStubs:(bool)requireExplicitStubs; 9 | 10 | @end 11 | 12 | #ifndef CEDAR_DOUBLES_COMPATIBILITY_MODE 13 | #define fake_for(x) CDR_fake_for((x)) 14 | #define nice_fake_for(x) CDR_fake_for((x), false) 15 | #endif 16 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRFake.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | 4 | @interface CDRFake : NSObject 5 | 6 | @property (nonatomic, assign) Class klass; 7 | 8 | - (id)initWithClass:(Class)klass requireExplicitStubs:(bool)requireExplicitStubs; 9 | 10 | @end 11 | 12 | #ifndef CEDAR_DOUBLES_COMPATIBILITY_MODE 13 | #define fake_for(x) CDR_fake_for((x)) 14 | #define nice_fake_for(x) CDR_fake_for((x), false) 15 | #endif 16 | -------------------------------------------------------------------------------- /ios/capybara-touch/CTAppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "CTAppDelegate.h" 2 | #import "CTViewController.h" 3 | 4 | @implementation CTAppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 7 | { 8 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 9 | self.window.rootViewController = [[CTViewController alloc] init]; 10 | [self.window makeKeyAndVisible]; 11 | return YES; 12 | } 13 | 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CedarMatchers.h: -------------------------------------------------------------------------------- 1 | // Base 2 | #import "Equal.h" 3 | #import "BeTruthy.h" 4 | #import "BeNil.h" 5 | #import "BeCloseTo.h" 6 | #import "BeSameInstanceAs.h" 7 | #import "BeInstanceOf.h" 8 | #import "BeGreaterThan.h" 9 | #import "BeGTE.h" 10 | #import "BeLessThan.h" 11 | #import "BeLTE.h" 12 | #import "RaiseException.h" 13 | 14 | // Container 15 | #import "BeEmpty.h" 16 | #import "Contain.h" 17 | 18 | #ifdef CEDAR_CUSTOM_MATCHERS 19 | #import CEDAR_CUSTOM_MATCHERS 20 | #endif 21 | -------------------------------------------------------------------------------- /ios/Pods/Pods-environment.h: -------------------------------------------------------------------------------- 1 | 2 | // To check if a library is compiled with CocoaPods you 3 | // can use the `COCOAPODS` macro definition which is 4 | // defined in the xcconfigs so it is available in 5 | // headers also when they are imported in the client 6 | // project. 7 | 8 | 9 | // CocoaAsyncSocket 10 | #define COCOAPODS_POD_AVAILABLE_CocoaAsyncSocket 11 | #define COCOAPODS_VERSION_MAJOR_CocoaAsyncSocket 7 12 | #define COCOAPODS_VERSION_MINOR_CocoaAsyncSocket 3 13 | #define COCOAPODS_VERSION_PATCH_CocoaAsyncSocket 2 14 | 15 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CedarMatchers.h: -------------------------------------------------------------------------------- 1 | // Base 2 | #import "Equal.h" 3 | #import "BeTruthy.h" 4 | #import "BeNil.h" 5 | #import "BeCloseTo.h" 6 | #import "BeSameInstanceAs.h" 7 | #import "BeInstanceOf.h" 8 | #import "BeGreaterThan.h" 9 | #import "BeGTE.h" 10 | #import "BeLessThan.h" 11 | #import "BeLTE.h" 12 | #import "RaiseException.h" 13 | 14 | // Container 15 | #import "BeEmpty.h" 16 | #import "Contain.h" 17 | 18 | #ifdef CEDAR_CUSTOM_MATCHERS 19 | #import CEDAR_CUSTOM_MATCHERS 20 | #endif 21 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CedarMatchers.h: -------------------------------------------------------------------------------- 1 | // Base 2 | #import "Equal.h" 3 | #import "BeTruthy.h" 4 | #import "BeNil.h" 5 | #import "BeCloseTo.h" 6 | #import "BeSameInstanceAs.h" 7 | #import "BeInstanceOf.h" 8 | #import "BeGreaterThan.h" 9 | #import "BeGTE.h" 10 | #import "BeLessThan.h" 11 | #import "BeLTE.h" 12 | #import "RaiseException.h" 13 | 14 | // Container 15 | #import "BeEmpty.h" 16 | #import "Contain.h" 17 | 18 | #ifdef CEDAR_CUSTOM_MATCHERS 19 | #import CEDAR_CUSTOM_MATCHERS 20 | #endif 21 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CDRSpyInfo.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class CedarDoubleImpl; 4 | 5 | @interface CDRSpyInfo : NSObject 6 | 7 | @property (nonatomic, assign) Class originalClass; 8 | @property (nonatomic, assign) id originalObject; 9 | @property (nonatomic, retain) CedarDoubleImpl *cedarDouble; 10 | 11 | + (void)storeSpyInfoForObject:(id)originalObject; 12 | 13 | + (CedarDoubleImpl *)cedarDoubleForObject:(id)originalObject; 14 | + (Class)originalClassForObject:(id)originalObject; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRSpyInfo.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class CedarDoubleImpl; 4 | 5 | @interface CDRSpyInfo : NSObject 6 | 7 | @property (nonatomic, assign) Class originalClass; 8 | @property (nonatomic, assign) id originalObject; 9 | @property (nonatomic, retain) CedarDoubleImpl *cedarDouble; 10 | 11 | + (void)storeSpyInfoForObject:(id)originalObject; 12 | 13 | + (CedarDoubleImpl *)cedarDoubleForObject:(id)originalObject; 14 | + (Class)originalClassForObject:(id)originalObject; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRSpyInfo.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class CedarDoubleImpl; 4 | 5 | @interface CDRSpyInfo : NSObject 6 | 7 | @property (nonatomic, assign) Class originalClass; 8 | @property (nonatomic, assign) id originalObject; 9 | @property (nonatomic, retain) CedarDoubleImpl *cedarDouble; 10 | 11 | + (void)storeSpyInfoForObject:(id)originalObject; 12 | 13 | + (CedarDoubleImpl *)cedarDoubleForObject:(id)originalObject; 14 | + (Class)originalClassForObject:(id)originalObject; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CDRSpy.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | 4 | @interface CDRSpy : NSProxy 5 | 6 | + (void)interceptMessagesForInstance:(id)instance; 7 | 8 | @end 9 | 10 | namespace Cedar { namespace Doubles { 11 | inline void CDR_spy_on(id instance) { 12 | if (![[instance class] conformsToProtocol:@protocol(CedarDouble)]) { 13 | [CDRSpy interceptMessagesForInstance:instance]; 14 | } 15 | } 16 | }} 17 | 18 | #ifndef CEDAR_DOUBLES_COMPATIBILITY_MODE 19 | #define spy_on(x) CDR_spy_on((x)) 20 | #endif 21 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRSpy.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | 4 | @interface CDRSpy : NSProxy 5 | 6 | + (void)interceptMessagesForInstance:(id)instance; 7 | 8 | @end 9 | 10 | namespace Cedar { namespace Doubles { 11 | inline void CDR_spy_on(id instance) { 12 | if (![[instance class] conformsToProtocol:@protocol(CedarDouble)]) { 13 | [CDRSpy interceptMessagesForInstance:instance]; 14 | } 15 | } 16 | }} 17 | 18 | #ifndef CEDAR_DOUBLES_COMPATIBILITY_MODE 19 | #define spy_on(x) CDR_spy_on((x)) 20 | #endif 21 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRSpy.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | 4 | @interface CDRSpy : NSProxy 5 | 6 | + (void)interceptMessagesForInstance:(id)instance; 7 | 8 | @end 9 | 10 | namespace Cedar { namespace Doubles { 11 | inline void CDR_spy_on(id instance) { 12 | if (![[instance class] conformsToProtocol:@protocol(CedarDouble)]) { 13 | [CDRSpy interceptMessagesForInstance:instance]; 14 | } 15 | } 16 | }} 17 | 18 | #ifndef CEDAR_DOUBLES_COMPATIBILITY_MODE 19 | #define spy_on(x) CDR_spy_on((x)) 20 | #endif 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by http://gitignore.io 2 | 3 | ### Objective-C ### 4 | # Xcode 5 | .DS_Store 6 | */build/* 7 | *.pbxuser 8 | !default.pbxuser 9 | *.mode1v3 10 | !default.mode1v3 11 | *.mode2v3 12 | !default.mode2v3 13 | *.perspectivev3 14 | !default.perspectivev3 15 | xcuserdata 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | .idea/ 20 | *.hmap 21 | 22 | ### Ruby ### 23 | *.gem 24 | *.rbc 25 | .bundle 26 | .config 27 | coverage 28 | InstalledFiles 29 | lib/bundler/man 30 | pkg 31 | rdoc 32 | spec/reports 33 | test/tmp 34 | test/version_tmp 35 | tmp 36 | 37 | # YARD artifacts 38 | .yardoc 39 | _yardoc 40 | doc/ 41 | *.xcbkptlist 42 | -------------------------------------------------------------------------------- /ios/capybara-touch/CTViewController.m: -------------------------------------------------------------------------------- 1 | #import "CTViewController.h" 2 | #import "CTCapybaraClient.h" 3 | 4 | @interface CTViewController () 5 | 6 | @property (strong, nonatomic) CTCapybaraClient *client; 7 | 8 | @end 9 | 10 | @implementation CTViewController 11 | 12 | - (id)init { 13 | if (self = [super init]) { 14 | self.client = [[CTCapybaraClient alloc] init]; 15 | } 16 | return self; 17 | } 18 | 19 | - (void)viewDidLoad 20 | { 21 | [super viewDidLoad]; 22 | 23 | CGRect frame = self.view.bounds; 24 | self.view = self.client.webView; 25 | self.view.frame = frame; 26 | 27 | [self.client connect]; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /ios/capybara-touch/CTCapybaraClient.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @protocol CTCapybaraDelegate 5 | 6 | - (void)visit:(NSString *)url; 7 | - (void)reset; 8 | - (void)javascriptCommand:(NSArray *)arguments; 9 | - (void)executeScript:(NSString *)script; 10 | 11 | - (void)findXpath:(NSString *)xpath; 12 | - (void)findCSS:(NSString *)selector; 13 | 14 | - (void)currentURL; 15 | - (void)body; 16 | - (void)title; 17 | - (void)headers; 18 | 19 | @end 20 | 21 | @interface CTCapybaraClient : NSObject 22 | 23 | - (void)connect; 24 | 25 | @property (strong, nonatomic) UIWebView *webView; 26 | 27 | @end 28 | 29 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/SpecHelper.h: -------------------------------------------------------------------------------- 1 | #import "CDRSpec.h" 2 | #import "CDRSharedExampleGroupPool.h" 3 | #import "CDRExampleParent.h" 4 | 5 | @interface SpecHelper : NSObject { 6 | NSMutableDictionary *sharedExampleContext_, *sharedExampleGroups_; 7 | NSArray *globalBeforeEachClasses_, *globalAfterEachClasses_; 8 | BOOL shouldOnlyRunFocused_; 9 | } 10 | 11 | @property (nonatomic, retain, readonly) NSMutableDictionary *sharedExampleContext; 12 | @property (nonatomic, retain) NSArray *globalBeforeEachClasses, *globalAfterEachClasses; 13 | 14 | @property (nonatomic, assign) BOOL shouldOnlyRunFocused; 15 | 16 | + (SpecHelper *)specHelper; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/SpecHelper.h: -------------------------------------------------------------------------------- 1 | #import "CDRSpec.h" 2 | #import "CDRSharedExampleGroupPool.h" 3 | #import "CDRExampleParent.h" 4 | 5 | @interface SpecHelper : NSObject { 6 | NSMutableDictionary *sharedExampleContext_, *sharedExampleGroups_; 7 | NSArray *globalBeforeEachClasses_, *globalAfterEachClasses_; 8 | BOOL shouldOnlyRunFocused_; 9 | } 10 | 11 | @property (nonatomic, retain, readonly) NSMutableDictionary *sharedExampleContext; 12 | @property (nonatomic, retain) NSArray *globalBeforeEachClasses, *globalAfterEachClasses; 13 | 14 | @property (nonatomic, assign) BOOL shouldOnlyRunFocused; 15 | 16 | + (SpecHelper *)specHelper; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/SpecHelper.h: -------------------------------------------------------------------------------- 1 | #import "CDRSpec.h" 2 | #import "CDRSharedExampleGroupPool.h" 3 | #import "CDRExampleParent.h" 4 | 5 | @interface SpecHelper : NSObject { 6 | NSMutableDictionary *sharedExampleContext_, *sharedExampleGroups_; 7 | NSArray *globalBeforeEachClasses_, *globalAfterEachClasses_; 8 | BOOL shouldOnlyRunFocused_; 9 | } 10 | 11 | @property (nonatomic, retain, readonly) NSMutableDictionary *sharedExampleContext; 12 | @property (nonatomic, retain) NSArray *globalBeforeEachClasses, *globalAfterEachClasses; 13 | 14 | @property (nonatomic, assign) BOOL shouldOnlyRunFocused; 15 | 16 | + (SpecHelper *)specHelper; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /lib/capybara/touch/errors.rb: -------------------------------------------------------------------------------- 1 | module Capybara::Touch 2 | class InvalidResponseError < StandardError 3 | end 4 | 5 | class NoResponseError < StandardError 6 | end 7 | 8 | class NodeNotAttachedError < Capybara::ElementNotFound 9 | end 10 | 11 | class ClickFailed < StandardError 12 | end 13 | 14 | class TimeoutError < Timeout::Error 15 | end 16 | 17 | class JsonError 18 | def initialize(response) 19 | error = JSON.parse response 20 | 21 | @class_name = error['class'] 22 | @message = error['message'] 23 | end 24 | 25 | def exception 26 | error_class.new @message 27 | end 28 | 29 | private 30 | 31 | def error_class 32 | Capybara::Touch.const_get @class_name 33 | end 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /ios/Specs/Specs-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.lazerwalker.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /ios/capybara-touch/Private Frameworks/GraphicsServices.framework/_UIFontExtraData.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2012 by Steve Nygard. 5 | */ 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSCharacterSet, NSData; 10 | 11 | @interface _UIFontExtraData : NSObject 12 | { 13 | NSData *_latin1MappingTable; 14 | NSCharacterSet *_coveredCharacterSet; 15 | float _ascender; 16 | float _descender; 17 | float _lineHeight; 18 | float _lineGap; 19 | struct __fFlags { 20 | unsigned int _initialized:1; 21 | unsigned int _isSystemFont:1; 22 | unsigned int _hasKernPair:1; 23 | unsigned int _checkedLatin1Table:1; 24 | } _fFlags; 25 | } 26 | 27 | - (void)dealloc; 28 | 29 | @end 30 | 31 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/UIGeometryStringifiers.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "StringifiersBase.h" 3 | 4 | namespace Cedar { namespace Matchers { namespace Stringifiers { 5 | inline NSString * string_for(const CGRect value) { 6 | return NSStringFromCGRect(value); 7 | } 8 | 9 | inline NSString * string_for(const CGSize value) { 10 | return NSStringFromCGSize(value); 11 | } 12 | 13 | inline NSString * string_for(const CGPoint value) { 14 | return NSStringFromCGPoint(value); 15 | } 16 | 17 | inline NSString * string_for(const UIEdgeInsets value) { 18 | return NSStringFromUIEdgeInsets(value); 19 | } 20 | 21 | inline NSString * string_for(const CGAffineTransform value) { 22 | return NSStringFromCGAffineTransform(value); 23 | } 24 | }}} 25 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/UIGeometryStringifiers.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "StringifiersBase.h" 3 | 4 | namespace Cedar { namespace Matchers { namespace Stringifiers { 5 | inline NSString * string_for(const CGRect value) { 6 | return NSStringFromCGRect(value); 7 | } 8 | 9 | inline NSString * string_for(const CGSize value) { 10 | return NSStringFromCGSize(value); 11 | } 12 | 13 | inline NSString * string_for(const CGPoint value) { 14 | return NSStringFromCGPoint(value); 15 | } 16 | 17 | inline NSString * string_for(const UIEdgeInsets value) { 18 | return NSStringFromUIEdgeInsets(value); 19 | } 20 | 21 | inline NSString * string_for(const CGAffineTransform value) { 22 | return NSStringFromCGAffineTransform(value); 23 | } 24 | }}} 25 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/UIGeometryStringifiers.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "StringifiersBase.h" 3 | 4 | namespace Cedar { namespace Matchers { namespace Stringifiers { 5 | inline NSString * string_for(const CGRect value) { 6 | return NSStringFromCGRect(value); 7 | } 8 | 9 | inline NSString * string_for(const CGSize value) { 10 | return NSStringFromCGSize(value); 11 | } 12 | 13 | inline NSString * string_for(const CGPoint value) { 14 | return NSStringFromCGPoint(value); 15 | } 16 | 17 | inline NSString * string_for(const UIEdgeInsets value) { 18 | return NSStringFromUIEdgeInsets(value); 19 | } 20 | 21 | inline NSString * string_for(const CGAffineTransform value) { 22 | return NSStringFromCGAffineTransform(value); 23 | } 24 | }}} 25 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/BeEmpty.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | namespace Cedar { namespace Matchers { 4 | class BeEmpty : public Base<> { 5 | private: 6 | BeEmpty & operator=(const BeEmpty &); 7 | 8 | public: 9 | inline BeEmpty() : Base<>() {} 10 | inline ~BeEmpty() {} 11 | // Allow default copy ctor. 12 | 13 | inline const BeEmpty & operator()() const { return *this; } 14 | 15 | template 16 | bool matches(const U &) const; 17 | 18 | protected: 19 | inline /*virtual*/ NSString * failure_message_end() const { return @"be empty"; } 20 | }; 21 | 22 | static const BeEmpty be_empty = BeEmpty(); 23 | 24 | #pragma mark Generic 25 | template 26 | bool BeEmpty::matches(const U & actualValue) const { 27 | return Comparators::compare_empty(actualValue); 28 | } 29 | }} 30 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CedarDouble.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | namespace Cedar { namespace Doubles { 4 | class StubbedMethod; 5 | }} 6 | 7 | @protocol CedarDouble 8 | 9 | - (Cedar::Doubles::StubbedMethod &)add_stub:(const Cedar::Doubles::StubbedMethod &)stubbed_method; 10 | - (NSArray *)sent_messages; 11 | - (void)reset_sent_messages; 12 | 13 | @end 14 | 15 | namespace Cedar { namespace Doubles { 16 | 17 | struct MethodStubbingMarker { 18 | const char *fileName; 19 | int lineNumber; 20 | }; 21 | 22 | id operator,(id, const MethodStubbingMarker &); 23 | 24 | void operator,(id, const StubbedMethod &); 25 | }} 26 | 27 | #ifndef CEDAR_MATCHERS_DISALLOW_STUB_METHOD 28 | #define stub_method(x) ,(Cedar::Doubles::MethodStubbingMarker){__FILE__, __LINE__},Cedar::Doubles::StubbedMethod((x)) 29 | #endif 30 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CedarDoubleImpl.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "StubbedMethod.h" 3 | 4 | @protocol CedarDouble; 5 | 6 | typedef enum { 7 | CDRStubMethodNotStubbed = 0, 8 | CDRStubMethodInvoked, 9 | CDRStubWrongArguments, 10 | } CDRStubInvokeStatus; 11 | 12 | @interface CedarDoubleImpl : NSObject 13 | 14 | @property (nonatomic, retain, readonly) NSMutableArray *sent_messages; 15 | 16 | + (void)afterEach; 17 | 18 | - (id)initWithDouble:(NSObject *)parent_double; 19 | 20 | - (void)reset_sent_messages; 21 | 22 | - (Cedar::Doubles::StubbedMethod &)add_stub:(const Cedar::Doubles::StubbedMethod &)stubbed_method; 23 | - (Cedar::Doubles::StubbedMethod::selector_map_t &)stubbed_methods; 24 | - (CDRStubInvokeStatus)invoke_stubbed_method:(NSInvocation *)invocation; 25 | - (void)record_method_invocation:(NSInvocation *)invocation; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CedarApplicationDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int runSpecsWithinUIApplication(); 4 | void exitWithStatusFromUIApplication(int status); 5 | 6 | @class CDRExampleReporterViewController; 7 | 8 | // In some cases CDRIPhoneOTestRunner needs to spin up an instance of Cedar app. 9 | // It appears that SenTestingKit fails to start up the test when CedarApplicationDelegate 10 | // is used. Solution is to use a subclass of UIApplicaton. 11 | @interface CedarApplication : UIApplication { 12 | UIWindow *window_; 13 | CDRExampleReporterViewController *viewController_; 14 | } 15 | @end 16 | 17 | // Needed for backwards compatibility with existing projects using CedarApplicationDelegate 18 | @interface CedarApplicationDelegate : NSObject { 19 | UIWindow *window_; 20 | CDRExampleReporterViewController *viewController_; 21 | } 22 | @end 23 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/ReturnValue.h: -------------------------------------------------------------------------------- 1 | #import "ValueArgument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | template 6 | class ReturnValue : public ValueArgument { 7 | private: 8 | ReturnValue & operator=(const ReturnValue &); 9 | 10 | public: 11 | explicit ReturnValue(const T &); 12 | virtual ~ReturnValue(); 13 | 14 | virtual bool matches_encoding(const char *) const; 15 | }; 16 | 17 | template 18 | ReturnValue::ReturnValue(const T & value) : ValueArgument(value) {} 19 | 20 | template 21 | /* virtual */ ReturnValue::~ReturnValue() {} 22 | 23 | template 24 | /* virtual */ bool ReturnValue::matches_encoding(const char * actual_argument_encoding) const { 25 | return 0 == strcmp(@encode(T), actual_argument_encoding); 26 | } 27 | 28 | }} 29 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/BeEmpty.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | namespace Cedar { namespace Matchers { 4 | class BeEmpty : public Base<> { 5 | private: 6 | BeEmpty & operator=(const BeEmpty &); 7 | 8 | public: 9 | inline BeEmpty() : Base<>() {} 10 | inline ~BeEmpty() {} 11 | // Allow default copy ctor. 12 | 13 | inline const BeEmpty & operator()() const { return *this; } 14 | 15 | template 16 | bool matches(const U &) const; 17 | 18 | protected: 19 | inline /*virtual*/ NSString * failure_message_end() const { return @"be empty"; } 20 | }; 21 | 22 | static const BeEmpty be_empty = BeEmpty(); 23 | 24 | #pragma mark Generic 25 | template 26 | bool BeEmpty::matches(const U & actualValue) const { 27 | return Comparators::compare_empty(actualValue); 28 | } 29 | }} 30 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CedarDouble.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | namespace Cedar { namespace Doubles { 4 | class StubbedMethod; 5 | }} 6 | 7 | @protocol CedarDouble 8 | 9 | - (Cedar::Doubles::StubbedMethod &)add_stub:(const Cedar::Doubles::StubbedMethod &)stubbed_method; 10 | - (NSArray *)sent_messages; 11 | - (void)reset_sent_messages; 12 | 13 | @end 14 | 15 | namespace Cedar { namespace Doubles { 16 | 17 | struct MethodStubbingMarker { 18 | const char *fileName; 19 | int lineNumber; 20 | }; 21 | 22 | id operator,(id, const MethodStubbingMarker &); 23 | 24 | void operator,(id, const StubbedMethod &); 25 | }} 26 | 27 | #ifndef CEDAR_MATCHERS_DISALLOW_STUB_METHOD 28 | #define stub_method(x) ,(Cedar::Doubles::MethodStubbingMarker){__FILE__, __LINE__},Cedar::Doubles::StubbedMethod((x)) 29 | #endif 30 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CedarDoubleImpl.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "StubbedMethod.h" 3 | 4 | @protocol CedarDouble; 5 | 6 | typedef enum { 7 | CDRStubMethodNotStubbed = 0, 8 | CDRStubMethodInvoked, 9 | CDRStubWrongArguments, 10 | } CDRStubInvokeStatus; 11 | 12 | @interface CedarDoubleImpl : NSObject 13 | 14 | @property (nonatomic, retain, readonly) NSMutableArray *sent_messages; 15 | 16 | + (void)afterEach; 17 | 18 | - (id)initWithDouble:(NSObject *)parent_double; 19 | 20 | - (void)reset_sent_messages; 21 | 22 | - (Cedar::Doubles::StubbedMethod &)add_stub:(const Cedar::Doubles::StubbedMethod &)stubbed_method; 23 | - (Cedar::Doubles::StubbedMethod::selector_map_t &)stubbed_methods; 24 | - (CDRStubInvokeStatus)invoke_stubbed_method:(NSInvocation *)invocation; 25 | - (void)record_method_invocation:(NSInvocation *)invocation; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /capybara-touch.gemspec: -------------------------------------------------------------------------------- 1 | $:.push File.expand_path("../lib", __FILE__) 2 | require "capybara/touch/version" 3 | 4 | Gem::Specification.new do |s| 5 | s.name = "capybara-touch" 6 | s.version = Capybara::Driver::Touch::VERSION.dup 7 | s.authors = ["Mike Walker"] 8 | s.email = "michael@lazerwalker.com" 9 | s.homepage = "http://github.com/lazerwalker/capybara-touch" 10 | s.summary = "A Capybara driver for Mobile Webkit on the iOS Simulator" 11 | s.description = s.summary 12 | 13 | s.files = `git ls-files`.split("\n") 14 | s.test_files = `git ls-files -- {spec,features}/*`.split("\n") 15 | s.require_path = "lib" 16 | 17 | s.required_ruby_version = ">= 1.9.0" 18 | 19 | s.add_runtime_dependency("capybara", "~> 2.0", ">= 2.0.2") 20 | 21 | s.add_development_dependency("rspec", "~> 2.6.0") 22 | s.add_development_dependency("rake") 23 | s.add_development_dependency("sinatra") 24 | end 25 | 26 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/AnyInstanceArgument.h: -------------------------------------------------------------------------------- 1 | #import "Argument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | class AnyInstanceArgument : public Argument { 6 | private: 7 | AnyInstanceArgument & operator=(const AnyInstanceArgument &); 8 | 9 | public: 10 | explicit AnyInstanceArgument(const Class); 11 | virtual ~AnyInstanceArgument(); 12 | // Allow default copy ctor. 13 | 14 | virtual const char * const value_encoding() const; 15 | virtual void * value_bytes() const { return NULL; } 16 | virtual NSString * value_string() const; 17 | 18 | virtual bool matches_encoding(const char *) const; 19 | virtual bool matches_bytes(void *) const; 20 | 21 | private: 22 | const Class class_; 23 | }; 24 | 25 | 26 | namespace Arguments { 27 | Argument::shared_ptr_t any(Class); 28 | } 29 | }} 30 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/BeEmpty.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | namespace Cedar { namespace Matchers { 4 | class BeEmpty : public Base<> { 5 | private: 6 | BeEmpty & operator=(const BeEmpty &); 7 | 8 | public: 9 | inline BeEmpty() : Base<>() {} 10 | inline ~BeEmpty() {} 11 | // Allow default copy ctor. 12 | 13 | inline const BeEmpty & operator()() const { return *this; } 14 | 15 | template 16 | bool matches(const U &) const; 17 | 18 | protected: 19 | inline /*virtual*/ NSString * failure_message_end() const { return @"be empty"; } 20 | }; 21 | 22 | static const BeEmpty be_empty = BeEmpty(); 23 | 24 | #pragma mark Generic 25 | template 26 | bool BeEmpty::matches(const U & actualValue) const { 27 | return Comparators::compare_empty(actualValue); 28 | } 29 | }} 30 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CedarDouble.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | namespace Cedar { namespace Doubles { 4 | class StubbedMethod; 5 | }} 6 | 7 | @protocol CedarDouble 8 | 9 | - (Cedar::Doubles::StubbedMethod &)add_stub:(const Cedar::Doubles::StubbedMethod &)stubbed_method; 10 | - (NSArray *)sent_messages; 11 | - (void)reset_sent_messages; 12 | 13 | @end 14 | 15 | namespace Cedar { namespace Doubles { 16 | 17 | struct MethodStubbingMarker { 18 | const char *fileName; 19 | int lineNumber; 20 | }; 21 | 22 | id operator,(id, const MethodStubbingMarker &); 23 | 24 | void operator,(id, const StubbedMethod &); 25 | }} 26 | 27 | #ifndef CEDAR_MATCHERS_DISALLOW_STUB_METHOD 28 | #define stub_method(x) ,(Cedar::Doubles::MethodStubbingMarker){__FILE__, __LINE__},Cedar::Doubles::StubbedMethod((x)) 29 | #endif 30 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CedarApplicationDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int runSpecsWithinUIApplication(); 4 | void exitWithStatusFromUIApplication(int status); 5 | 6 | @class CDRExampleReporterViewController; 7 | 8 | // In some cases CDRIPhoneOTestRunner needs to spin up an instance of Cedar app. 9 | // It appears that SenTestingKit fails to start up the test when CedarApplicationDelegate 10 | // is used. Solution is to use a subclass of UIApplicaton. 11 | @interface CedarApplication : UIApplication { 12 | UIWindow *window_; 13 | CDRExampleReporterViewController *viewController_; 14 | } 15 | @end 16 | 17 | // Needed for backwards compatibility with existing projects using CedarApplicationDelegate 18 | @interface CedarApplicationDelegate : NSObject { 19 | UIWindow *window_; 20 | CDRExampleReporterViewController *viewController_; 21 | } 22 | @end 23 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/ReturnValue.h: -------------------------------------------------------------------------------- 1 | #import "ValueArgument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | template 6 | class ReturnValue : public ValueArgument { 7 | private: 8 | ReturnValue & operator=(const ReturnValue &); 9 | 10 | public: 11 | explicit ReturnValue(const T &); 12 | virtual ~ReturnValue(); 13 | 14 | virtual bool matches_encoding(const char *) const; 15 | }; 16 | 17 | template 18 | ReturnValue::ReturnValue(const T & value) : ValueArgument(value) {} 19 | 20 | template 21 | /* virtual */ ReturnValue::~ReturnValue() {} 22 | 23 | template 24 | /* virtual */ bool ReturnValue::matches_encoding(const char * actual_argument_encoding) const { 25 | return 0 == strcmp(@encode(T), actual_argument_encoding); 26 | } 27 | 28 | }} 29 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CedarDoubleImpl.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "StubbedMethod.h" 3 | 4 | @protocol CedarDouble; 5 | 6 | typedef enum { 7 | CDRStubMethodNotStubbed = 0, 8 | CDRStubMethodInvoked, 9 | CDRStubWrongArguments, 10 | } CDRStubInvokeStatus; 11 | 12 | @interface CedarDoubleImpl : NSObject 13 | 14 | @property (nonatomic, retain, readonly) NSMutableArray *sent_messages; 15 | 16 | + (void)afterEach; 17 | 18 | - (id)initWithDouble:(NSObject *)parent_double; 19 | 20 | - (void)reset_sent_messages; 21 | 22 | - (Cedar::Doubles::StubbedMethod &)add_stub:(const Cedar::Doubles::StubbedMethod &)stubbed_method; 23 | - (Cedar::Doubles::StubbedMethod::selector_map_t &)stubbed_methods; 24 | - (CDRStubInvokeStatus)invoke_stubbed_method:(NSInvocation *)invocation; 25 | - (void)record_method_invocation:(NSInvocation *)invocation; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CedarApplicationDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int runSpecsWithinUIApplication(); 4 | void exitWithStatusFromUIApplication(int status); 5 | 6 | @class CDRExampleReporterViewController; 7 | 8 | // In some cases CDRIPhoneOTestRunner needs to spin up an instance of Cedar app. 9 | // It appears that SenTestingKit fails to start up the test when CedarApplicationDelegate 10 | // is used. Solution is to use a subclass of UIApplicaton. 11 | @interface CedarApplication : UIApplication { 12 | UIWindow *window_; 13 | CDRExampleReporterViewController *viewController_; 14 | } 15 | @end 16 | 17 | // Needed for backwards compatibility with existing projects using CedarApplicationDelegate 18 | @interface CedarApplicationDelegate : NSObject { 19 | UIWindow *window_; 20 | CDRExampleReporterViewController *viewController_; 21 | } 22 | @end 23 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/ReturnValue.h: -------------------------------------------------------------------------------- 1 | #import "ValueArgument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | template 6 | class ReturnValue : public ValueArgument { 7 | private: 8 | ReturnValue & operator=(const ReturnValue &); 9 | 10 | public: 11 | explicit ReturnValue(const T &); 12 | virtual ~ReturnValue(); 13 | 14 | virtual bool matches_encoding(const char *) const; 15 | }; 16 | 17 | template 18 | ReturnValue::ReturnValue(const T & value) : ValueArgument(value) {} 19 | 20 | template 21 | /* virtual */ ReturnValue::~ReturnValue() {} 22 | 23 | template 24 | /* virtual */ bool ReturnValue::matches_encoding(const char * actual_argument_encoding) const { 25 | return 0 == strcmp(@encode(T), actual_argument_encoding); 26 | } 27 | 28 | }} 29 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/AnyInstanceArgument.h: -------------------------------------------------------------------------------- 1 | #import "Argument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | class AnyInstanceArgument : public Argument { 6 | private: 7 | AnyInstanceArgument & operator=(const AnyInstanceArgument &); 8 | 9 | public: 10 | explicit AnyInstanceArgument(const Class); 11 | virtual ~AnyInstanceArgument(); 12 | // Allow default copy ctor. 13 | 14 | virtual const char * const value_encoding() const; 15 | virtual void * value_bytes() const { return NULL; } 16 | virtual NSString * value_string() const; 17 | 18 | virtual bool matches_encoding(const char *) const; 19 | virtual bool matches_bytes(void *) const; 20 | 21 | private: 22 | const Class class_; 23 | }; 24 | 25 | 26 | namespace Arguments { 27 | Argument::shared_ptr_t any(Class); 28 | } 29 | }} 30 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/AnyInstanceArgument.h: -------------------------------------------------------------------------------- 1 | #import "Argument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | class AnyInstanceArgument : public Argument { 6 | private: 7 | AnyInstanceArgument & operator=(const AnyInstanceArgument &); 8 | 9 | public: 10 | explicit AnyInstanceArgument(const Class); 11 | virtual ~AnyInstanceArgument(); 12 | // Allow default copy ctor. 13 | 14 | virtual const char * const value_encoding() const; 15 | virtual void * value_bytes() const { return NULL; } 16 | virtual NSString * value_string() const; 17 | 18 | virtual bool matches_encoding(const char *) const; 19 | virtual bool matches_bytes(void *) const; 20 | 21 | private: 22 | const Class class_; 23 | }; 24 | 25 | 26 | namespace Arguments { 27 | Argument::shared_ptr_t any(Class); 28 | } 29 | }} 30 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/AnyArgument.h: -------------------------------------------------------------------------------- 1 | #import "Argument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | class AnyArgument : public Argument { 6 | private: 7 | AnyArgument & operator=(const AnyArgument &); 8 | 9 | public: 10 | AnyArgument() {}; 11 | virtual ~AnyArgument() {}; 12 | // Allow default copy ctor. 13 | 14 | virtual const char * const value_encoding() const { return ""; }; 15 | virtual void * value_bytes() const { return NULL; }; 16 | virtual NSString * value_string() const { return @"anything"; }; 17 | 18 | virtual bool matches_encoding(const char *) const { return true; } 19 | virtual bool matches_bytes(void *) const { return true; } 20 | 21 | }; 22 | 23 | namespace Arguments { 24 | static const Argument::shared_ptr_t anything = Argument::shared_ptr_t(new Doubles::AnyArgument()); 25 | } 26 | 27 | }} 28 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/BeTruthy.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | class BeTruthy : public Base<> { 6 | private: 7 | BeTruthy & operator=(const BeTruthy &); 8 | 9 | public: 10 | inline BeTruthy() : Base<>() {} 11 | inline ~BeTruthy() {} 12 | // Allow default copy ctor. 13 | 14 | inline const BeTruthy & operator()() const { return *this; } 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | inline /*virtual*/ NSString * failure_message_end() const { return @"evaluate to true"; } 21 | }; 22 | 23 | static const BeTruthy be_truthy = BeTruthy(); 24 | 25 | #pragma mark Generic 26 | template 27 | bool BeTruthy::matches(const U & actualValue) const { 28 | return !!actualValue; 29 | } 30 | 31 | }} 32 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/AnyArgument.h: -------------------------------------------------------------------------------- 1 | #import "Argument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | class AnyArgument : public Argument { 6 | private: 7 | AnyArgument & operator=(const AnyArgument &); 8 | 9 | public: 10 | AnyArgument() {}; 11 | virtual ~AnyArgument() {}; 12 | // Allow default copy ctor. 13 | 14 | virtual const char * const value_encoding() const { return ""; }; 15 | virtual void * value_bytes() const { return NULL; }; 16 | virtual NSString * value_string() const { return @"anything"; }; 17 | 18 | virtual bool matches_encoding(const char *) const { return true; } 19 | virtual bool matches_bytes(void *) const { return true; } 20 | 21 | }; 22 | 23 | namespace Arguments { 24 | static const Argument::shared_ptr_t anything = Argument::shared_ptr_t(new Doubles::AnyArgument()); 25 | } 26 | 27 | }} 28 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/BeTruthy.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | class BeTruthy : public Base<> { 6 | private: 7 | BeTruthy & operator=(const BeTruthy &); 8 | 9 | public: 10 | inline BeTruthy() : Base<>() {} 11 | inline ~BeTruthy() {} 12 | // Allow default copy ctor. 13 | 14 | inline const BeTruthy & operator()() const { return *this; } 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | inline /*virtual*/ NSString * failure_message_end() const { return @"evaluate to true"; } 21 | }; 22 | 23 | static const BeTruthy be_truthy = BeTruthy(); 24 | 25 | #pragma mark Generic 26 | template 27 | bool BeTruthy::matches(const U & actualValue) const { 28 | return !!actualValue; 29 | } 30 | 31 | }} 32 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/AnyArgument.h: -------------------------------------------------------------------------------- 1 | #import "Argument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | class AnyArgument : public Argument { 6 | private: 7 | AnyArgument & operator=(const AnyArgument &); 8 | 9 | public: 10 | AnyArgument() {}; 11 | virtual ~AnyArgument() {}; 12 | // Allow default copy ctor. 13 | 14 | virtual const char * const value_encoding() const { return ""; }; 15 | virtual void * value_bytes() const { return NULL; }; 16 | virtual NSString * value_string() const { return @"anything"; }; 17 | 18 | virtual bool matches_encoding(const char *) const { return true; } 19 | virtual bool matches_bytes(void *) const { return true; } 20 | 21 | }; 22 | 23 | namespace Arguments { 24 | static const Argument::shared_ptr_t anything = Argument::shared_ptr_t(new Doubles::AnyArgument()); 25 | } 26 | 27 | }} 28 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/BeTruthy.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | class BeTruthy : public Base<> { 6 | private: 7 | BeTruthy & operator=(const BeTruthy &); 8 | 9 | public: 10 | inline BeTruthy() : Base<>() {} 11 | inline ~BeTruthy() {} 12 | // Allow default copy ctor. 13 | 14 | inline const BeTruthy & operator()() const { return *this; } 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | inline /*virtual*/ NSString * failure_message_end() const { return @"evaluate to true"; } 21 | }; 22 | 23 | static const BeTruthy be_truthy = BeTruthy(); 24 | 25 | #pragma mark Generic 26 | template 27 | bool BeTruthy::matches(const U & actualValue) const { 28 | return !!actualValue; 29 | } 30 | 31 | }} 32 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CDRSpecFailure.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface CDRSpecFailure : NSException { 4 | NSString *fileName_; 5 | int lineNumber_; 6 | NSArray *callStackReturnAddresses_; 7 | } 8 | 9 | @property (nonatomic, retain, readonly) NSString *fileName; 10 | @property (nonatomic, assign, readonly) int lineNumber; 11 | @property (nonatomic, retain, readonly) NSArray *callStackReturnAddresses; 12 | 13 | + (id)specFailureWithReason:(NSString *)reason; 14 | + (id)specFailureWithReason:(NSString *)reason fileName:(NSString *)fileName lineNumber:(int)lineNumber; 15 | + (id)specFailureWithRaisedObject:(NSObject *)object; 16 | 17 | - (id)initWithReason:(NSString *)reason; 18 | - (id)initWithReason:(NSString *)reason fileName:(NSString *)fileName lineNumber:(int)lineNumber; 19 | - (id)initWithRaisedObject:(NSObject *)object; 20 | 21 | - (NSString *)callStackSymbolicatedSymbols:(NSError **)error; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /ios/capybara-touch/Extensions/UIFakeKeypress.m: -------------------------------------------------------------------------------- 1 | #import "UIFakeKeypress.h" 2 | #import "GraphicsServices.h" 3 | #import 4 | #define SBSERVPATH "/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices" 5 | 6 | @interface UIKeyboard : UIView 7 | 8 | + (UIKeyboard *)activeKeyboard; 9 | - (id)_typeCharacter:(id)arg1 withError:(CGPoint)arg2 shouldTypeVariants:(BOOL)arg3 baseKeyForVariants:(BOOL)arg4; 10 | 11 | @end 12 | 13 | @implementation UIFakeKeypress 14 | 15 | - (void)sendKeypressForString:(NSString *)string { 16 | UIKeyboard *keyboard = [UIKeyboard activeKeyboard]; 17 | if (keyboard) { 18 | for (int i=0; i 2 | 3 | @interface CDRSpecFailure : NSException { 4 | NSString *fileName_; 5 | int lineNumber_; 6 | NSArray *callStackReturnAddresses_; 7 | } 8 | 9 | @property (nonatomic, retain, readonly) NSString *fileName; 10 | @property (nonatomic, assign, readonly) int lineNumber; 11 | @property (nonatomic, retain, readonly) NSArray *callStackReturnAddresses; 12 | 13 | + (id)specFailureWithReason:(NSString *)reason; 14 | + (id)specFailureWithReason:(NSString *)reason fileName:(NSString *)fileName lineNumber:(int)lineNumber; 15 | + (id)specFailureWithRaisedObject:(NSObject *)object; 16 | 17 | - (id)initWithReason:(NSString *)reason; 18 | - (id)initWithReason:(NSString *)reason fileName:(NSString *)fileName lineNumber:(int)lineNumber; 19 | - (id)initWithRaisedObject:(NSObject *)object; 20 | 21 | - (NSString *)callStackSymbolicatedSymbols:(NSError **)error; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRSpecFailure.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface CDRSpecFailure : NSException { 4 | NSString *fileName_; 5 | int lineNumber_; 6 | NSArray *callStackReturnAddresses_; 7 | } 8 | 9 | @property (nonatomic, retain, readonly) NSString *fileName; 10 | @property (nonatomic, assign, readonly) int lineNumber; 11 | @property (nonatomic, retain, readonly) NSArray *callStackReturnAddresses; 12 | 13 | + (id)specFailureWithReason:(NSString *)reason; 14 | + (id)specFailureWithReason:(NSString *)reason fileName:(NSString *)fileName lineNumber:(int)lineNumber; 15 | + (id)specFailureWithRaisedObject:(NSObject *)object; 16 | 17 | - (id)initWithReason:(NSString *)reason; 18 | - (id)initWithReason:(NSString *)reason fileName:(NSString *)fileName lineNumber:(int)lineNumber; 19 | - (id)initWithRaisedObject:(NSObject *)object; 20 | 21 | - (NSString *)callStackSymbolicatedSymbols:(NSError **)error; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Mike Walker 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'rspec' 2 | require 'rspec/autorun' 3 | require 'rbconfig' 4 | require 'capybara' 5 | 6 | PROJECT_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')).freeze 7 | 8 | $LOAD_PATH << File.join(PROJECT_ROOT, 'lib') 9 | 10 | Dir[File.join(PROJECT_ROOT, 'spec', 'support', '**', '*.rb')].each { |file| require(file) } 11 | 12 | require 'capybara/touch' 13 | connection = Capybara::Touch::Connection.new(:device => "ipad") 14 | $webkit_browser = Capybara::Touch::Browser.new(connection) 15 | 16 | require 'capybara/spec/spec_helper' 17 | 18 | Capybara.register_driver :reusable_touch do |app| 19 | Capybara::Touch::Driver.new(app, :browser => $webkit_browser) 20 | end 21 | 22 | RSpec.configure do |c| 23 | Capybara::SpecHelper.configure(c) 24 | end 25 | 26 | def with_env_vars(vars) 27 | old_env_variables = {} 28 | vars.each do |key, value| 29 | old_env_variables[key] = ENV[key] 30 | ENV[key] = value 31 | end 32 | 33 | yield 34 | 35 | old_env_variables.each do |key, value| 36 | ENV[key] = value 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/ShouldSyntax.h: -------------------------------------------------------------------------------- 1 | #import "ActualValue.h" 2 | 3 | namespace Cedar { namespace Matchers { 4 | 5 | struct ActualValueMarker { 6 | const char *fileName; 7 | int lineNumber; 8 | }; 9 | 10 | template 11 | const ActualValue operator,(const T & actualValue, const ActualValueMarker & marker) { 12 | return ActualValue(marker.fileName, marker.lineNumber, actualValue); 13 | } 14 | 15 | template 16 | const ActualValueMatchProxy operator,(const ActualValue & actualValue, bool negate) { 17 | return negate ? actualValue.to_not : actualValue.to; 18 | } 19 | 20 | template 21 | void operator,(const ActualValueMatchProxy & matchProxy, const MatcherType & matcher) { 22 | matchProxy(matcher); 23 | } 24 | 25 | }} 26 | 27 | #ifndef CEDAR_MATCHERS_DISALLOW_SHOULD 28 | #define should ,(ActualValueMarker){__FILE__, __LINE__},false, 29 | #define should_not ,(ActualValueMarker){__FILE__, __LINE__},true, 30 | #endif 31 | -------------------------------------------------------------------------------- /lib/capybara/touch/socket_debugger.rb: -------------------------------------------------------------------------------- 1 | # Wraps the TCP socket and prints data sent and received. Used for debugging 2 | # the wire protocol. You can use this by passing a :socket_class to Browser. 3 | module Capybara::Touch 4 | class SocketDebugger 5 | def self.open(host, port) 6 | real_socket = TCPSocket.open(host, port) 7 | new(real_socket) 8 | end 9 | 10 | def initialize(socket) 11 | @socket = socket 12 | end 13 | 14 | def read(length) 15 | received @socket.read(length) 16 | end 17 | 18 | def puts(line) 19 | sent line 20 | @socket.puts(line) 21 | end 22 | 23 | def print(content) 24 | sent content 25 | @socket.print(content) 26 | end 27 | 28 | def gets 29 | received @socket.gets 30 | end 31 | 32 | def setsockopt(level, name, value) 33 | end 34 | 35 | private 36 | 37 | def sent(content) 38 | Kernel.puts " >> " + content.to_s 39 | end 40 | 41 | def received(content) 42 | Kernel.puts " << " + content.to_s 43 | content 44 | end 45 | end 46 | end 47 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/ShouldSyntax.h: -------------------------------------------------------------------------------- 1 | #import "ActualValue.h" 2 | 3 | namespace Cedar { namespace Matchers { 4 | 5 | struct ActualValueMarker { 6 | const char *fileName; 7 | int lineNumber; 8 | }; 9 | 10 | template 11 | const ActualValue operator,(const T & actualValue, const ActualValueMarker & marker) { 12 | return ActualValue(marker.fileName, marker.lineNumber, actualValue); 13 | } 14 | 15 | template 16 | const ActualValueMatchProxy operator,(const ActualValue & actualValue, bool negate) { 17 | return negate ? actualValue.to_not : actualValue.to; 18 | } 19 | 20 | template 21 | void operator,(const ActualValueMatchProxy & matchProxy, const MatcherType & matcher) { 22 | matchProxy(matcher); 23 | } 24 | 25 | }} 26 | 27 | #ifndef CEDAR_MATCHERS_DISALLOW_SHOULD 28 | #define should ,(ActualValueMarker){__FILE__, __LINE__},false, 29 | #define should_not ,(ActualValueMarker){__FILE__, __LINE__},true, 30 | #endif 31 | -------------------------------------------------------------------------------- /lib/capybara/touch/matchers.rb: -------------------------------------------------------------------------------- 1 | module Capybara 2 | module Touch 3 | module RspecMatchers 4 | RSpec::Matchers.define :have_errors do |expected| 5 | match do |actual| 6 | actual = resolve(actual) 7 | actual.error_messages.any? 8 | end 9 | 10 | failure_message_for_should do |actual| 11 | "Expected Javascript errors, but there were none." 12 | end 13 | 14 | failure_message_for_should_not do |actual| 15 | actual = resolve(actual) 16 | "Expected no Javascript errors, got:\n#{error_messages_for(actual)}" 17 | end 18 | 19 | def error_messages_for(obj) 20 | obj.error_messages.map do |m| 21 | " - #{m[:message]}" 22 | end.join("\n") 23 | end 24 | 25 | def resolve(actual) 26 | if actual.respond_to? :page 27 | actual.page.driver 28 | elsif actual.respond_to? :driver 29 | actual.driver 30 | else 31 | actual 32 | end 33 | end 34 | end 35 | end 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/ShouldSyntax.h: -------------------------------------------------------------------------------- 1 | #import "ActualValue.h" 2 | 3 | namespace Cedar { namespace Matchers { 4 | 5 | struct ActualValueMarker { 6 | const char *fileName; 7 | int lineNumber; 8 | }; 9 | 10 | template 11 | const ActualValue operator,(const T & actualValue, const ActualValueMarker & marker) { 12 | return ActualValue(marker.fileName, marker.lineNumber, actualValue); 13 | } 14 | 15 | template 16 | const ActualValueMatchProxy operator,(const ActualValue & actualValue, bool negate) { 17 | return negate ? actualValue.to_not : actualValue.to; 18 | } 19 | 20 | template 21 | void operator,(const ActualValueMatchProxy & matchProxy, const MatcherType & matcher) { 22 | matchProxy(matcher); 23 | } 24 | 25 | }} 26 | 27 | #ifndef CEDAR_MATCHERS_DISALLOW_SHOULD 28 | #define should ,(ActualValueMarker){__FILE__, __LINE__},false, 29 | #define should_not ,(ActualValueMarker){__FILE__, __LINE__},true, 30 | #endif 31 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/Argument.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CompareEqual.h" 3 | #import "CedarStringifiers.h" 4 | #import "CedarComparators.h" 5 | #import 6 | 7 | namespace Cedar { namespace Doubles { 8 | 9 | #pragma mark - Argument 10 | class Argument { 11 | public: 12 | virtual ~Argument() = 0; 13 | 14 | virtual const char * const value_encoding() const = 0; 15 | virtual void * value_bytes() const = 0; 16 | virtual NSString * value_string() const = 0; 17 | 18 | virtual bool matches_encoding(const char *) const = 0; 19 | virtual bool matches_bytes(void *) const = 0; 20 | bool operator==(const Argument &other_argument) const { 21 | return this->matches_encoding(other_argument.value_encoding()) && this->matches_bytes(other_argument.value_bytes()); 22 | }; 23 | 24 | bool operator!=(const Argument &other_argument) const { 25 | return !(*this == other_argument); 26 | }; 27 | 28 | typedef std::shared_ptr shared_ptr_t; 29 | }; 30 | 31 | inline /* virtual */ Argument::~Argument() {} 32 | 33 | }} 34 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CDRSharedExampleGroupPool.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol CDRSharedExampleGroupPool 4 | @end 5 | 6 | typedef void (^CDRSharedExampleGroupBlock)(NSDictionary *); 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | void sharedExamplesFor(NSString *, CDRSharedExampleGroupBlock); 12 | void itShouldBehaveLike(NSString *); 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | @interface CDRSharedExampleGroupPool : NSObject 18 | @end 19 | 20 | @interface CDRSharedExampleGroupPool (SharedExampleGroupDeclaration) 21 | - (void)declareSharedExampleGroups; 22 | @end 23 | 24 | #define SHARED_EXAMPLE_GROUPS_BEGIN(name) \ 25 | @interface SharedExampleGroupPoolFor##name : CDRSharedExampleGroupPool \ 26 | @end \ 27 | @implementation SharedExampleGroupPoolFor##name \ 28 | - (void)declareSharedExampleGroups { 29 | 30 | #define SHARED_EXAMPLE_GROUPS_END \ 31 | } \ 32 | @end 33 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/Argument.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CompareEqual.h" 3 | #import "CedarStringifiers.h" 4 | #import "CedarComparators.h" 5 | #import 6 | 7 | namespace Cedar { namespace Doubles { 8 | 9 | #pragma mark - Argument 10 | class Argument { 11 | public: 12 | virtual ~Argument() = 0; 13 | 14 | virtual const char * const value_encoding() const = 0; 15 | virtual void * value_bytes() const = 0; 16 | virtual NSString * value_string() const = 0; 17 | 18 | virtual bool matches_encoding(const char *) const = 0; 19 | virtual bool matches_bytes(void *) const = 0; 20 | bool operator==(const Argument &other_argument) const { 21 | return this->matches_encoding(other_argument.value_encoding()) && this->matches_bytes(other_argument.value_bytes()); 22 | }; 23 | 24 | bool operator!=(const Argument &other_argument) const { 25 | return !(*this == other_argument); 26 | }; 27 | 28 | typedef std::shared_ptr shared_ptr_t; 29 | }; 30 | 31 | inline /* virtual */ Argument::~Argument() {} 32 | 33 | }} 34 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/Argument.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CompareEqual.h" 3 | #import "CedarStringifiers.h" 4 | #import "CedarComparators.h" 5 | #import 6 | 7 | namespace Cedar { namespace Doubles { 8 | 9 | #pragma mark - Argument 10 | class Argument { 11 | public: 12 | virtual ~Argument() = 0; 13 | 14 | virtual const char * const value_encoding() const = 0; 15 | virtual void * value_bytes() const = 0; 16 | virtual NSString * value_string() const = 0; 17 | 18 | virtual bool matches_encoding(const char *) const = 0; 19 | virtual bool matches_bytes(void *) const = 0; 20 | bool operator==(const Argument &other_argument) const { 21 | return this->matches_encoding(other_argument.value_encoding()) && this->matches_bytes(other_argument.value_bytes()); 22 | }; 23 | 24 | bool operator!=(const Argument &other_argument) const { 25 | return !(*this == other_argument); 26 | }; 27 | 28 | typedef std::shared_ptr shared_ptr_t; 29 | }; 30 | 31 | inline /* virtual */ Argument::~Argument() {} 32 | 33 | }} 34 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRSharedExampleGroupPool.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol CDRSharedExampleGroupPool 4 | @end 5 | 6 | typedef void (^CDRSharedExampleGroupBlock)(NSDictionary *); 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | void sharedExamplesFor(NSString *, CDRSharedExampleGroupBlock); 12 | void itShouldBehaveLike(NSString *); 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | @interface CDRSharedExampleGroupPool : NSObject 18 | @end 19 | 20 | @interface CDRSharedExampleGroupPool (SharedExampleGroupDeclaration) 21 | - (void)declareSharedExampleGroups; 22 | @end 23 | 24 | #define SHARED_EXAMPLE_GROUPS_BEGIN(name) \ 25 | @interface SharedExampleGroupPoolFor##name : CDRSharedExampleGroupPool \ 26 | @end \ 27 | @implementation SharedExampleGroupPoolFor##name \ 28 | - (void)declareSharedExampleGroups { 29 | 30 | #define SHARED_EXAMPLE_GROUPS_END \ 31 | } \ 32 | @end 33 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRSharedExampleGroupPool.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol CDRSharedExampleGroupPool 4 | @end 5 | 6 | typedef void (^CDRSharedExampleGroupBlock)(NSDictionary *); 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | void sharedExamplesFor(NSString *, CDRSharedExampleGroupBlock); 12 | void itShouldBehaveLike(NSString *); 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | @interface CDRSharedExampleGroupPool : NSObject 18 | @end 19 | 20 | @interface CDRSharedExampleGroupPool (SharedExampleGroupDeclaration) 21 | - (void)declareSharedExampleGroups; 22 | @end 23 | 24 | #define SHARED_EXAMPLE_GROUPS_BEGIN(name) \ 25 | @interface SharedExampleGroupPoolFor##name : CDRSharedExampleGroupPool \ 26 | @end \ 27 | @implementation SharedExampleGroupPoolFor##name \ 28 | - (void)declareSharedExampleGroups { 29 | 30 | #define SHARED_EXAMPLE_GROUPS_END \ 31 | } \ 32 | @end 33 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | PATH 2 | remote: . 3 | specs: 4 | capybara-touch (0.0.1) 5 | capybara (~> 2.0, >= 2.0.2) 6 | 7 | GEM 8 | remote: https://rubygems.org/ 9 | specs: 10 | capybara (2.1.0) 11 | mime-types (>= 1.16) 12 | nokogiri (>= 1.3.3) 13 | rack (>= 1.0.0) 14 | rack-test (>= 0.5.4) 15 | xpath (~> 2.0) 16 | diff-lcs (1.1.2) 17 | mime-types (1.25) 18 | mini_portile (0.5.1) 19 | nokogiri (1.6.0) 20 | mini_portile (~> 0.5.0) 21 | rack (1.5.2) 22 | rack-protection (1.5.1) 23 | rack 24 | rack-test (0.6.2) 25 | rack (>= 1.0) 26 | rake (0.9.2) 27 | rspec (2.6.0) 28 | rspec-core (~> 2.6.0) 29 | rspec-expectations (~> 2.6.0) 30 | rspec-mocks (~> 2.6.0) 31 | rspec-core (2.6.4) 32 | rspec-expectations (2.6.0) 33 | diff-lcs (~> 1.1.2) 34 | rspec-mocks (2.6.0) 35 | sinatra (1.4.4) 36 | rack (~> 1.4) 37 | rack-protection (~> 1.4) 38 | tilt (~> 1.3, >= 1.3.4) 39 | tilt (1.4.1) 40 | xpath (2.0.0) 41 | nokogiri (~> 1.3) 42 | 43 | PLATFORMS 44 | ruby 45 | x86-mingw32 46 | 47 | DEPENDENCIES 48 | capybara-touch! 49 | rake 50 | rspec (~> 2.6.0) 51 | sinatra 52 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/UIGeometryCompareEqual.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "ComparatorsBase.h" 4 | #import "UIGeometryStringifiers.h" 5 | 6 | namespace Cedar { namespace Matchers { namespace Comparators { 7 | template 8 | bool compare_equal(CGRect const actualValue, const U & expectedValue) { 9 | return CGRectEqualToRect(actualValue, expectedValue); 10 | } 11 | 12 | template 13 | bool compare_equal(CGSize const actualValue, const U & expectedValue) { 14 | return CGSizeEqualToSize(actualValue, expectedValue); 15 | } 16 | 17 | template 18 | bool compare_equal(CGPoint const actualValue, const U & expectedValue) { 19 | return CGPointEqualToPoint(actualValue, expectedValue); 20 | } 21 | 22 | template 23 | bool compare_equal(UIEdgeInsets const actualValue, const U & expectedValue) { 24 | return UIEdgeInsetsEqualToEdgeInsets(actualValue, expectedValue); 25 | } 26 | 27 | template 28 | bool compare_equal(CGAffineTransform const actualValue, const U & expectedValue) { 29 | return CGAffineTransformEqualToTransform(actualValue, expectedValue); 30 | } 31 | }}} 32 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/UIGeometryCompareEqual.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "ComparatorsBase.h" 4 | #import "UIGeometryStringifiers.h" 5 | 6 | namespace Cedar { namespace Matchers { namespace Comparators { 7 | template 8 | bool compare_equal(CGRect const actualValue, const U & expectedValue) { 9 | return CGRectEqualToRect(actualValue, expectedValue); 10 | } 11 | 12 | template 13 | bool compare_equal(CGSize const actualValue, const U & expectedValue) { 14 | return CGSizeEqualToSize(actualValue, expectedValue); 15 | } 16 | 17 | template 18 | bool compare_equal(CGPoint const actualValue, const U & expectedValue) { 19 | return CGPointEqualToPoint(actualValue, expectedValue); 20 | } 21 | 22 | template 23 | bool compare_equal(UIEdgeInsets const actualValue, const U & expectedValue) { 24 | return UIEdgeInsetsEqualToEdgeInsets(actualValue, expectedValue); 25 | } 26 | 27 | template 28 | bool compare_equal(CGAffineTransform const actualValue, const U & expectedValue) { 29 | return CGAffineTransformEqualToTransform(actualValue, expectedValue); 30 | } 31 | }}} 32 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/UIGeometryCompareEqual.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "ComparatorsBase.h" 4 | #import "UIGeometryStringifiers.h" 5 | 6 | namespace Cedar { namespace Matchers { namespace Comparators { 7 | template 8 | bool compare_equal(CGRect const actualValue, const U & expectedValue) { 9 | return CGRectEqualToRect(actualValue, expectedValue); 10 | } 11 | 12 | template 13 | bool compare_equal(CGSize const actualValue, const U & expectedValue) { 14 | return CGSizeEqualToSize(actualValue, expectedValue); 15 | } 16 | 17 | template 18 | bool compare_equal(CGPoint const actualValue, const U & expectedValue) { 19 | return CGPointEqualToPoint(actualValue, expectedValue); 20 | } 21 | 22 | template 23 | bool compare_equal(UIEdgeInsets const actualValue, const U & expectedValue) { 24 | return UIEdgeInsetsEqualToEdgeInsets(actualValue, expectedValue); 25 | } 26 | 27 | template 28 | bool compare_equal(CGAffineTransform const actualValue, const U & expectedValue) { 29 | return CGAffineTransformEqualToTransform(actualValue, expectedValue); 30 | } 31 | }}} 32 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CDRExampleBase.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRExampleParent.h" 3 | 4 | @protocol CDRExampleReporter; 5 | 6 | enum CDRExampleState { 7 | CDRExampleStateIncomplete = 0x00, 8 | CDRExampleStateSkipped = 0x01, 9 | CDRExampleStatePassed = 0x03, 10 | CDRExampleStatePending = 0x07, 11 | CDRExampleStateFailed = 0x0F, 12 | CDRExampleStateError = 0x1F 13 | }; 14 | typedef enum CDRExampleState CDRExampleState; 15 | 16 | @interface CDRExampleBase : NSObject { 17 | NSString *text_; 18 | id parent_; 19 | BOOL focused_; 20 | NSTimeInterval runTime_; 21 | } 22 | 23 | @property (nonatomic, readonly) NSString *text; 24 | @property (nonatomic, assign) id parent; 25 | @property (nonatomic, assign, getter=isFocused) BOOL focused; 26 | @property (nonatomic) NSUInteger stackAddress; 27 | 28 | - (id)initWithText:(NSString *)text; 29 | 30 | - (void)run; 31 | - (BOOL)shouldRun; 32 | 33 | - (BOOL)hasChildren; 34 | - (BOOL)hasFocusedExamples; 35 | 36 | - (NSString *)message; 37 | - (NSString *)fullText; 38 | - (NSMutableArray *)fullTextInPieces; 39 | @end 40 | 41 | @interface CDRExampleBase (RunReporting) 42 | - (CDRExampleState)state; 43 | - (NSTimeInterval)runTime; 44 | - (float)progress; 45 | @end 46 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRExampleBase.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRExampleParent.h" 3 | 4 | @protocol CDRExampleReporter; 5 | 6 | enum CDRExampleState { 7 | CDRExampleStateIncomplete = 0x00, 8 | CDRExampleStateSkipped = 0x01, 9 | CDRExampleStatePassed = 0x03, 10 | CDRExampleStatePending = 0x07, 11 | CDRExampleStateFailed = 0x0F, 12 | CDRExampleStateError = 0x1F 13 | }; 14 | typedef enum CDRExampleState CDRExampleState; 15 | 16 | @interface CDRExampleBase : NSObject { 17 | NSString *text_; 18 | id parent_; 19 | BOOL focused_; 20 | NSTimeInterval runTime_; 21 | } 22 | 23 | @property (nonatomic, readonly) NSString *text; 24 | @property (nonatomic, assign) id parent; 25 | @property (nonatomic, assign, getter=isFocused) BOOL focused; 26 | @property (nonatomic) NSUInteger stackAddress; 27 | 28 | - (id)initWithText:(NSString *)text; 29 | 30 | - (void)run; 31 | - (BOOL)shouldRun; 32 | 33 | - (BOOL)hasChildren; 34 | - (BOOL)hasFocusedExamples; 35 | 36 | - (NSString *)message; 37 | - (NSString *)fullText; 38 | - (NSMutableArray *)fullTextInPieces; 39 | @end 40 | 41 | @interface CDRExampleBase (RunReporting) 42 | - (CDRExampleState)state; 43 | - (NSTimeInterval)runTime; 44 | - (float)progress; 45 | @end 46 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/StringifiersBase.h: -------------------------------------------------------------------------------- 1 | #import 2 | #include 3 | 4 | namespace Cedar { namespace Matchers { namespace Stringifiers { 5 | NSString * object_description_for(const void *objectValue); 6 | 7 | template 8 | NSString * string_for(const U & value) { 9 | if (0 == strncmp(@encode(U), "@", 1)) { 10 | return object_description_for(&value); 11 | } else { 12 | std::stringstream temp; 13 | temp << value; 14 | return [NSString stringWithCString:temp.str().c_str() encoding:NSUTF8StringEncoding]; 15 | } 16 | } 17 | 18 | inline NSString * string_for(const char value) { 19 | return string_for(static_cast(value)); 20 | } 21 | 22 | inline NSString * string_for(const Class & value) { 23 | return NSStringFromClass(value); 24 | } 25 | 26 | inline NSString * string_for(const BOOL value) { 27 | return value ? @"YES" : @"NO"; 28 | } 29 | 30 | inline NSString * string_for(NSNumber * const value) { 31 | return string_for([value floatValue]); 32 | } 33 | 34 | inline NSString * string_for(const NSDecimal value) { 35 | return NSDecimalString(&value, [NSLocale currentLocale]); 36 | } 37 | }}} 38 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRExampleBase.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRExampleParent.h" 3 | 4 | @protocol CDRExampleReporter; 5 | 6 | enum CDRExampleState { 7 | CDRExampleStateIncomplete = 0x00, 8 | CDRExampleStateSkipped = 0x01, 9 | CDRExampleStatePassed = 0x03, 10 | CDRExampleStatePending = 0x07, 11 | CDRExampleStateFailed = 0x0F, 12 | CDRExampleStateError = 0x1F 13 | }; 14 | typedef enum CDRExampleState CDRExampleState; 15 | 16 | @interface CDRExampleBase : NSObject { 17 | NSString *text_; 18 | id parent_; 19 | BOOL focused_; 20 | NSTimeInterval runTime_; 21 | } 22 | 23 | @property (nonatomic, readonly) NSString *text; 24 | @property (nonatomic, assign) id parent; 25 | @property (nonatomic, assign, getter=isFocused) BOOL focused; 26 | @property (nonatomic) NSUInteger stackAddress; 27 | 28 | - (id)initWithText:(NSString *)text; 29 | 30 | - (void)run; 31 | - (BOOL)shouldRun; 32 | 33 | - (BOOL)hasChildren; 34 | - (BOOL)hasFocusedExamples; 35 | 36 | - (NSString *)message; 37 | - (NSString *)fullText; 38 | - (NSMutableArray *)fullTextInPieces; 39 | @end 40 | 41 | @interface CDRExampleBase (RunReporting) 42 | - (CDRExampleState)state; 43 | - (NSTimeInterval)runTime; 44 | - (float)progress; 45 | @end 46 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/StringifiersBase.h: -------------------------------------------------------------------------------- 1 | #import 2 | #include 3 | 4 | namespace Cedar { namespace Matchers { namespace Stringifiers { 5 | NSString * object_description_for(const void *objectValue); 6 | 7 | template 8 | NSString * string_for(const U & value) { 9 | if (0 == strncmp(@encode(U), "@", 1)) { 10 | return object_description_for(&value); 11 | } else { 12 | std::stringstream temp; 13 | temp << value; 14 | return [NSString stringWithCString:temp.str().c_str() encoding:NSUTF8StringEncoding]; 15 | } 16 | } 17 | 18 | inline NSString * string_for(const char value) { 19 | return string_for(static_cast(value)); 20 | } 21 | 22 | inline NSString * string_for(const Class & value) { 23 | return NSStringFromClass(value); 24 | } 25 | 26 | inline NSString * string_for(const BOOL value) { 27 | return value ? @"YES" : @"NO"; 28 | } 29 | 30 | inline NSString * string_for(NSNumber * const value) { 31 | return string_for([value floatValue]); 32 | } 33 | 34 | inline NSString * string_for(const NSDecimal value) { 35 | return NSDecimalString(&value, [NSLocale currentLocale]); 36 | } 37 | }}} 38 | -------------------------------------------------------------------------------- /ios/Specs/UI/CTViewControllerSpec.mm: -------------------------------------------------------------------------------- 1 | #import "CTViewController.h" 2 | #import "CTCapybaraClient+Spec.h" 3 | 4 | @interface CTViewController (Spec) 5 | @property (strong, nonatomic) CTCapybaraClient *client; 6 | @end 7 | 8 | using namespace Cedar::Matchers; 9 | using namespace Cedar::Doubles; 10 | 11 | SPEC_BEGIN(CTViewControllerSpec) 12 | 13 | describe(@"CTViewController", ^{ 14 | __block CTViewController *controller; 15 | 16 | beforeEach(^{ 17 | controller = [[CTViewController alloc] init]; 18 | }); 19 | 20 | describe(@"viewDidLoad", ^{ 21 | beforeEach(^{ 22 | spy_on(controller.client); 23 | [controller viewDidLoad]; 24 | }); 25 | 26 | it(@"should have a visible web view", ^{ 27 | controller.view should be_instance_of([UIWebView class]); 28 | }); 29 | 30 | it(@"should set the web view's delegate", ^{ 31 | controller.webView.delegate should equal(controller); 32 | }); 33 | 34 | it(@"should tell the client about the web view", ^{ 35 | controller.client.webView should equal(controller.webView); 36 | }); 37 | 38 | it(@"should connect to the client", ^{ 39 | controller.client should have_received(@selector(connect)); 40 | }); 41 | }); 42 | }); 43 | 44 | SPEC_END 45 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/StringifiersBase.h: -------------------------------------------------------------------------------- 1 | #import 2 | #include 3 | 4 | namespace Cedar { namespace Matchers { namespace Stringifiers { 5 | NSString * object_description_for(const void *objectValue); 6 | 7 | template 8 | NSString * string_for(const U & value) { 9 | if (0 == strncmp(@encode(U), "@", 1)) { 10 | return object_description_for(&value); 11 | } else { 12 | std::stringstream temp; 13 | temp << value; 14 | return [NSString stringWithCString:temp.str().c_str() encoding:NSUTF8StringEncoding]; 15 | } 16 | } 17 | 18 | inline NSString * string_for(const char value) { 19 | return string_for(static_cast(value)); 20 | } 21 | 22 | inline NSString * string_for(const Class & value) { 23 | return NSStringFromClass(value); 24 | } 25 | 26 | inline NSString * string_for(const BOOL value) { 27 | return value ? @"YES" : @"NO"; 28 | } 29 | 30 | inline NSString * string_for(NSNumber * const value) { 31 | return string_for([value floatValue]); 32 | } 33 | 34 | inline NSString * string_for(const NSDecimal value) { 35 | return NSDecimalString(&value, [NSLocale currentLocale]); 36 | } 37 | }}} 38 | -------------------------------------------------------------------------------- /ios/Pods/Pods-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Public Domain License 18 | 19 | The CocoaAsyncSocket project is in the public domain. 20 | 21 | The original TCP version (AsyncSocket) was created by Dustin Voss in January 2003. 22 | Updated and maintained by Deusty LLC and the Apple development community. 23 | 24 | Title 25 | CocoaAsyncSocket 26 | Type 27 | PSGroupSpecifier 28 | 29 | 30 | FooterText 31 | Generated by CocoaPods - http://cocoapods.org 32 | Title 33 | 34 | Type 35 | PSGroupSpecifier 36 | 37 | 38 | StringsTable 39 | Acknowledgements 40 | Title 41 | Acknowledgements 42 | 43 | 44 | -------------------------------------------------------------------------------- /lib/capybara/touch/cookie_jar.rb: -------------------------------------------------------------------------------- 1 | require 'webrick' 2 | 3 | # A simple cookie jar implementation. 4 | # Does not take special cookie attributes 5 | # into account like expire, max-age, httponly, secure 6 | class Capybara::Touch::CookieJar 7 | attr_reader :browser 8 | 9 | def initialize(browser) 10 | @browser = browser 11 | end 12 | 13 | def [](*args) 14 | cookie = find(*args) 15 | cookie && cookie.value 16 | end 17 | 18 | def find(name, domain = nil, path = "/") 19 | # we are sorting by path size because more specific paths take 20 | # precendence 21 | cookies.sort_by { |c| -c.path.size }.find { |c| 22 | c.name.downcase == name.downcase && 23 | (!domain || valid_domain?(c, domain)) && 24 | (!path || valid_path?(c, path)) 25 | } 26 | end 27 | 28 | protected 29 | 30 | def valid_domain?(cookie, domain) 31 | ends_with?(("." + domain).downcase, 32 | normalize_domain(cookie.domain).downcase) 33 | end 34 | 35 | def normalize_domain(domain) 36 | domain = "." + domain unless domain[0,1] == "." 37 | domain 38 | end 39 | 40 | def valid_path?(cookie, path) 41 | starts_with?(path, cookie.path) 42 | end 43 | 44 | def ends_with?(str, suffix) 45 | str[-suffix.size..-1] == suffix 46 | end 47 | 48 | def starts_with?(str, prefix) 49 | str[0, prefix.size] == prefix 50 | end 51 | 52 | def cookies 53 | browser.get_cookies.map { |c| WEBrick::Cookie.parse_set_cookie(c) } 54 | end 55 | end 56 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/Contain.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | namespace Cedar { namespace Matchers { 4 | template 5 | class Contain : public Base<> { 6 | private: 7 | Contain & operator=(const Contain &); 8 | 9 | public: 10 | explicit Contain(const T & element); 11 | ~Contain(); 12 | // Allow default copy ctor. 13 | 14 | template 15 | bool matches(const U &) const; 16 | 17 | protected: 18 | virtual NSString * failure_message_end() const; 19 | 20 | private: 21 | const T & element_; 22 | }; 23 | 24 | template 25 | inline Contain contain(const T & element) { 26 | return Contain(element); 27 | } 28 | 29 | template 30 | inline Contain::Contain(const T & element) 31 | : Base<>(), element_(element) { 32 | } 33 | 34 | template 35 | Contain::~Contain() { 36 | } 37 | 38 | template 39 | inline /*virtual*/ NSString * Contain::failure_message_end() const { 40 | NSString * elementString = Stringifiers::string_for(element_); 41 | return [NSString stringWithFormat:@"contain <%@>", elementString]; 42 | } 43 | 44 | #pragma mark Generic 45 | template template 46 | bool Contain::matches(const U & actualValue) const { 47 | return Comparators::compare_contains(actualValue, element_); 48 | } 49 | }} 50 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/Contain.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | namespace Cedar { namespace Matchers { 4 | template 5 | class Contain : public Base<> { 6 | private: 7 | Contain & operator=(const Contain &); 8 | 9 | public: 10 | explicit Contain(const T & element); 11 | ~Contain(); 12 | // Allow default copy ctor. 13 | 14 | template 15 | bool matches(const U &) const; 16 | 17 | protected: 18 | virtual NSString * failure_message_end() const; 19 | 20 | private: 21 | const T & element_; 22 | }; 23 | 24 | template 25 | inline Contain contain(const T & element) { 26 | return Contain(element); 27 | } 28 | 29 | template 30 | inline Contain::Contain(const T & element) 31 | : Base<>(), element_(element) { 32 | } 33 | 34 | template 35 | Contain::~Contain() { 36 | } 37 | 38 | template 39 | inline /*virtual*/ NSString * Contain::failure_message_end() const { 40 | NSString * elementString = Stringifiers::string_for(element_); 41 | return [NSString stringWithFormat:@"contain <%@>", elementString]; 42 | } 43 | 44 | #pragma mark Generic 45 | template template 46 | bool Contain::matches(const U & actualValue) const { 47 | return Comparators::compare_contains(actualValue, element_); 48 | } 49 | }} 50 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/Contain.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | namespace Cedar { namespace Matchers { 4 | template 5 | class Contain : public Base<> { 6 | private: 7 | Contain & operator=(const Contain &); 8 | 9 | public: 10 | explicit Contain(const T & element); 11 | ~Contain(); 12 | // Allow default copy ctor. 13 | 14 | template 15 | bool matches(const U &) const; 16 | 17 | protected: 18 | virtual NSString * failure_message_end() const; 19 | 20 | private: 21 | const T & element_; 22 | }; 23 | 24 | template 25 | inline Contain contain(const T & element) { 26 | return Contain(element); 27 | } 28 | 29 | template 30 | inline Contain::Contain(const T & element) 31 | : Base<>(), element_(element) { 32 | } 33 | 34 | template 35 | Contain::~Contain() { 36 | } 37 | 38 | template 39 | inline /*virtual*/ NSString * Contain::failure_message_end() const { 40 | NSString * elementString = Stringifiers::string_for(element_); 41 | return [NSString stringWithFormat:@"contain <%@>", elementString]; 42 | } 43 | 44 | #pragma mark Generic 45 | template template 46 | bool Contain::matches(const U & actualValue) const { 47 | return Comparators::compare_contains(actualValue, element_); 48 | } 49 | }} 50 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/HaveReceived.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | #import "Argument.h" 3 | #import "InvocationMatcher.h" 4 | 5 | namespace Cedar { namespace Doubles { 6 | 7 | class HaveReceived : public Matchers::Base<>, private InvocationMatcher { 8 | private: 9 | HaveReceived & operator=(const HaveReceived &); 10 | 11 | public: 12 | explicit HaveReceived(const SEL); 13 | ~HaveReceived(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | HaveReceived & with(const T &); 18 | template 19 | HaveReceived & with(const T &, ArgumentPack... pack); 20 | template 21 | HaveReceived & and_with(const T & argument) { return with(argument); } 22 | 23 | bool matches(id) const; 24 | 25 | protected: 26 | virtual NSString * failure_message_end() const; 27 | 28 | private: 29 | void verify_object_is_a_double(id) const; 30 | }; 31 | 32 | HaveReceived have_received(const SEL expectedSelector); 33 | HaveReceived have_received(const char * expectedMethod); 34 | 35 | template 36 | HaveReceived & HaveReceived::with(const T & value) { 37 | this->add_argument(value); 38 | return *this; 39 | } 40 | 41 | template 42 | HaveReceived & HaveReceived::with(const T & value, ArgumentPack... pack) { 43 | this->with(value); 44 | this->with(pack...); 45 | return *this; 46 | } 47 | 48 | }} 49 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/HaveReceived.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | #import "Argument.h" 3 | #import "InvocationMatcher.h" 4 | 5 | namespace Cedar { namespace Doubles { 6 | 7 | class HaveReceived : public Matchers::Base<>, private InvocationMatcher { 8 | private: 9 | HaveReceived & operator=(const HaveReceived &); 10 | 11 | public: 12 | explicit HaveReceived(const SEL); 13 | ~HaveReceived(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | HaveReceived & with(const T &); 18 | template 19 | HaveReceived & with(const T &, ArgumentPack... pack); 20 | template 21 | HaveReceived & and_with(const T & argument) { return with(argument); } 22 | 23 | bool matches(id) const; 24 | 25 | protected: 26 | virtual NSString * failure_message_end() const; 27 | 28 | private: 29 | void verify_object_is_a_double(id) const; 30 | }; 31 | 32 | HaveReceived have_received(const SEL expectedSelector); 33 | HaveReceived have_received(const char * expectedMethod); 34 | 35 | template 36 | HaveReceived & HaveReceived::with(const T & value) { 37 | this->add_argument(value); 38 | return *this; 39 | } 40 | 41 | template 42 | HaveReceived & HaveReceived::with(const T & value, ArgumentPack... pack) { 43 | this->with(value); 44 | this->with(pack...); 45 | return *this; 46 | } 47 | 48 | }} 49 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/HaveReceived.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | #import "Argument.h" 3 | #import "InvocationMatcher.h" 4 | 5 | namespace Cedar { namespace Doubles { 6 | 7 | class HaveReceived : public Matchers::Base<>, private InvocationMatcher { 8 | private: 9 | HaveReceived & operator=(const HaveReceived &); 10 | 11 | public: 12 | explicit HaveReceived(const SEL); 13 | ~HaveReceived(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | HaveReceived & with(const T &); 18 | template 19 | HaveReceived & with(const T &, ArgumentPack... pack); 20 | template 21 | HaveReceived & and_with(const T & argument) { return with(argument); } 22 | 23 | bool matches(id) const; 24 | 25 | protected: 26 | virtual NSString * failure_message_end() const; 27 | 28 | private: 29 | void verify_object_is_a_double(id) const; 30 | }; 31 | 32 | HaveReceived have_received(const SEL expectedSelector); 33 | HaveReceived have_received(const char * expectedMethod); 34 | 35 | template 36 | HaveReceived & HaveReceived::with(const T & value) { 37 | this->add_argument(value); 38 | return *this; 39 | } 40 | 41 | template 42 | HaveReceived & HaveReceived::with(const T & value, ArgumentPack... pack) { 43 | this->with(value); 44 | this->with(pack...); 45 | return *this; 46 | } 47 | 48 | }} 49 | -------------------------------------------------------------------------------- /ios/capybara-touch/capybara-touch-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.lazerwalker.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/InvocationMatcher.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "ValueArgument.h" 3 | 4 | namespace Cedar { namespace Doubles { 5 | 6 | class InvocationMatcher { 7 | public: 8 | typedef std::vector arguments_vector_t; 9 | enum { OBJC_DEFAULT_ARGUMENT_COUNT = 2 }; 10 | 11 | public: 12 | InvocationMatcher(const SEL); 13 | virtual ~InvocationMatcher() {} 14 | 15 | void add_argument(const Argument::shared_ptr_t argument); 16 | template 17 | void add_argument(const T &); 18 | 19 | bool matches(NSInvocation * const) const; 20 | NSString *mismatch_reason(); 21 | 22 | const SEL selector() const { return expectedSelector_; } 23 | const arguments_vector_t & arguments() const { return arguments_; } 24 | const bool match_any_arguments() const { return arguments_.empty(); } 25 | void verify_count_and_types_of_arguments(id instance) const; 26 | 27 | private: 28 | bool matches_arguments(NSInvocation * const) const; 29 | NSMethodSignature *method_signature_for_instance(id instance) const; 30 | void compare_argument_count_to_method_signature(NSMethodSignature * const methodSignature) const; 31 | void compare_argument_types_to_method_signature(NSMethodSignature * const methodSignature) const; 32 | 33 | private: 34 | const SEL expectedSelector_; 35 | arguments_vector_t arguments_; 36 | }; 37 | 38 | template 39 | void InvocationMatcher::add_argument(const T & value) { 40 | this->add_argument(Argument::shared_ptr_t(new ValueArgument(value))); 41 | } 42 | 43 | }} 44 | -------------------------------------------------------------------------------- /ios/capybara-touch.xcworkspace/xcshareddata/capybara-touch.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 40679A6E-223F-4218-88AD-F0DEA9F8DB29 9 | IDESourceControlProjectName 10 | capybara-touch 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 791C020B-BA24-420A-97E3-80224C2F7A7E 14 | ssh://github.com/lazerwalker/capybara-touch.git 15 | 16 | IDESourceControlProjectPath 17 | ios/capybara-touch.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 791C020B-BA24-420A-97E3-80224C2F7A7E 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | ssh://github.com/lazerwalker/capybara-touch.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | 791C020B-BA24-420A-97E3-80224C2F7A7E 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 791C020B-BA24-420A-97E3-80224C2F7A7E 36 | IDESourceControlWCCName 37 | capybara-touch 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/InvocationMatcher.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "ValueArgument.h" 3 | 4 | namespace Cedar { namespace Doubles { 5 | 6 | class InvocationMatcher { 7 | public: 8 | typedef std::vector arguments_vector_t; 9 | enum { OBJC_DEFAULT_ARGUMENT_COUNT = 2 }; 10 | 11 | public: 12 | InvocationMatcher(const SEL); 13 | virtual ~InvocationMatcher() {} 14 | 15 | void add_argument(const Argument::shared_ptr_t argument); 16 | template 17 | void add_argument(const T &); 18 | 19 | bool matches(NSInvocation * const) const; 20 | NSString *mismatch_reason(); 21 | 22 | const SEL selector() const { return expectedSelector_; } 23 | const arguments_vector_t & arguments() const { return arguments_; } 24 | const bool match_any_arguments() const { return arguments_.empty(); } 25 | void verify_count_and_types_of_arguments(id instance) const; 26 | 27 | private: 28 | bool matches_arguments(NSInvocation * const) const; 29 | NSMethodSignature *method_signature_for_instance(id instance) const; 30 | void compare_argument_count_to_method_signature(NSMethodSignature * const methodSignature) const; 31 | void compare_argument_types_to_method_signature(NSMethodSignature * const methodSignature) const; 32 | 33 | private: 34 | const SEL expectedSelector_; 35 | arguments_vector_t arguments_; 36 | }; 37 | 38 | template 39 | void InvocationMatcher::add_argument(const T & value) { 40 | this->add_argument(Argument::shared_ptr_t(new ValueArgument(value))); 41 | } 42 | 43 | }} 44 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/InvocationMatcher.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "ValueArgument.h" 3 | 4 | namespace Cedar { namespace Doubles { 5 | 6 | class InvocationMatcher { 7 | public: 8 | typedef std::vector arguments_vector_t; 9 | enum { OBJC_DEFAULT_ARGUMENT_COUNT = 2 }; 10 | 11 | public: 12 | InvocationMatcher(const SEL); 13 | virtual ~InvocationMatcher() {} 14 | 15 | void add_argument(const Argument::shared_ptr_t argument); 16 | template 17 | void add_argument(const T &); 18 | 19 | bool matches(NSInvocation * const) const; 20 | NSString *mismatch_reason(); 21 | 22 | const SEL selector() const { return expectedSelector_; } 23 | const arguments_vector_t & arguments() const { return arguments_; } 24 | const bool match_any_arguments() const { return arguments_.empty(); } 25 | void verify_count_and_types_of_arguments(id instance) const; 26 | 27 | private: 28 | bool matches_arguments(NSInvocation * const) const; 29 | NSMethodSignature *method_signature_for_instance(id instance) const; 30 | void compare_argument_count_to_method_signature(NSMethodSignature * const methodSignature) const; 31 | void compare_argument_types_to_method_signature(NSMethodSignature * const methodSignature) const; 32 | 33 | private: 34 | const SEL expectedSelector_; 35 | arguments_vector_t arguments_; 36 | }; 37 | 38 | template 39 | void InvocationMatcher::add_argument(const T & value) { 40 | this->add_argument(Argument::shared_ptr_t(new ValueArgument(value))); 41 | } 42 | 43 | }} 44 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/BeNil.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | #import "CDRSpecFailure.h" 4 | 5 | #include 6 | 7 | namespace Cedar { namespace Matchers { 8 | struct BeNilMessageBuilder { 9 | template 10 | static NSString * string_for_actual_value(const U & value) { 11 | throw std::logic_error("Should never generate a failure message for a nil comparison to non-pointer type."); 12 | } 13 | 14 | template 15 | static NSString * string_for_actual_value(U * const & value) { 16 | return value ? [NSString stringWithFormat:@"%p", value] : @"nil"; 17 | } 18 | }; 19 | 20 | class BeNil : public Base { 21 | private: 22 | BeNil & operator=(const BeNil &); 23 | 24 | public: 25 | inline BeNil() : Base() {} 26 | inline ~BeNil() {} 27 | // Allow default copy ctor. 28 | 29 | inline const BeNil & operator()() const { return *this; } 30 | 31 | template 32 | bool matches(const U &) const; 33 | 34 | template 35 | bool matches(U * const &) const; 36 | 37 | protected: 38 | inline /*virtual*/ NSString * failure_message_end() const { return @"be nil"; } 39 | }; 40 | 41 | static const BeNil be_nil = BeNil(); 42 | 43 | #pragma mark Generic 44 | template 45 | bool BeNil::matches(const U & actualValue) const { 46 | [[CDRSpecFailure specFailureWithReason:@"Attempt to compare non-pointer type to nil"] raise]; 47 | return NO; 48 | } 49 | 50 | template 51 | bool BeNil::matches(U * const & actualValue) const { 52 | return !actualValue; 53 | } 54 | 55 | }} 56 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/BeNil.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | #import "CDRSpecFailure.h" 4 | 5 | #include 6 | 7 | namespace Cedar { namespace Matchers { 8 | struct BeNilMessageBuilder { 9 | template 10 | static NSString * string_for_actual_value(const U & value) { 11 | throw std::logic_error("Should never generate a failure message for a nil comparison to non-pointer type."); 12 | } 13 | 14 | template 15 | static NSString * string_for_actual_value(U * const & value) { 16 | return value ? [NSString stringWithFormat:@"%p", value] : @"nil"; 17 | } 18 | }; 19 | 20 | class BeNil : public Base { 21 | private: 22 | BeNil & operator=(const BeNil &); 23 | 24 | public: 25 | inline BeNil() : Base() {} 26 | inline ~BeNil() {} 27 | // Allow default copy ctor. 28 | 29 | inline const BeNil & operator()() const { return *this; } 30 | 31 | template 32 | bool matches(const U &) const; 33 | 34 | template 35 | bool matches(U * const &) const; 36 | 37 | protected: 38 | inline /*virtual*/ NSString * failure_message_end() const { return @"be nil"; } 39 | }; 40 | 41 | static const BeNil be_nil = BeNil(); 42 | 43 | #pragma mark Generic 44 | template 45 | bool BeNil::matches(const U & actualValue) const { 46 | [[CDRSpecFailure specFailureWithReason:@"Attempt to compare non-pointer type to nil"] raise]; 47 | return NO; 48 | } 49 | 50 | template 51 | bool BeNil::matches(U * const & actualValue) const { 52 | return !actualValue; 53 | } 54 | 55 | }} 56 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/BeNil.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | #import "CDRSpecFailure.h" 4 | 5 | #include 6 | 7 | namespace Cedar { namespace Matchers { 8 | struct BeNilMessageBuilder { 9 | template 10 | static NSString * string_for_actual_value(const U & value) { 11 | throw std::logic_error("Should never generate a failure message for a nil comparison to non-pointer type."); 12 | } 13 | 14 | template 15 | static NSString * string_for_actual_value(U * const & value) { 16 | return value ? [NSString stringWithFormat:@"%p", value] : @"nil"; 17 | } 18 | }; 19 | 20 | class BeNil : public Base { 21 | private: 22 | BeNil & operator=(const BeNil &); 23 | 24 | public: 25 | inline BeNil() : Base() {} 26 | inline ~BeNil() {} 27 | // Allow default copy ctor. 28 | 29 | inline const BeNil & operator()() const { return *this; } 30 | 31 | template 32 | bool matches(const U &) const; 33 | 34 | template 35 | bool matches(U * const &) const; 36 | 37 | protected: 38 | inline /*virtual*/ NSString * failure_message_end() const { return @"be nil"; } 39 | }; 40 | 41 | static const BeNil be_nil = BeNil(); 42 | 43 | #pragma mark Generic 44 | template 45 | bool BeNil::matches(const U & actualValue) const { 46 | [[CDRSpecFailure specFailureWithReason:@"Attempt to compare non-pointer type to nil"] raise]; 47 | return NO; 48 | } 49 | 50 | template 51 | bool BeNil::matches(U * const & actualValue) const { 52 | return !actualValue; 53 | } 54 | 55 | }} 56 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/RaiseException.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | #import 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | typedef void (^empty_block_t)(); 7 | 8 | struct RaiseExceptionMessageBuilder { 9 | static NSString * string_for_actual_value(empty_block_t value) { 10 | return [value description]; 11 | } 12 | }; 13 | 14 | class RaiseException : public Base { 15 | private: 16 | RaiseException & operator=(const RaiseException &); 17 | 18 | public: 19 | explicit RaiseException(NSObject * = nil, Class = nil, bool = false, NSString * = nil); 20 | ~RaiseException(); 21 | // Allow default copy ctor. 22 | 23 | RaiseException operator()() const; 24 | RaiseException operator()(Class) const; 25 | RaiseException operator()(NSObject *) const; 26 | 27 | RaiseException & or_subclass(); 28 | 29 | RaiseException & with_reason(NSString * const reason); 30 | RaiseException with_reason(NSString * const reason) const; 31 | 32 | bool matches(empty_block_t) const; 33 | 34 | protected: 35 | virtual NSString * failure_message_end() const; 36 | 37 | private: 38 | bool exception_matches_expected_class(NSObject * const exception) const; 39 | bool exception_matches_expected_instance(NSObject * const exception) const; 40 | bool exception_matches_expected_reason(NSObject * const exception) const; 41 | 42 | private: 43 | const NSObject *expectedExceptionInstance_; 44 | const Class expectedExceptionClass_; 45 | bool allowSubclasses_; 46 | NSString *expectedReason_; 47 | }; 48 | 49 | RaiseException raise() __attribute__((deprecated)); // Please use raise_exception 50 | RaiseException raise(); 51 | 52 | static const RaiseException raise_exception; 53 | 54 | }} 55 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/RaiseException.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | #import 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | typedef void (^empty_block_t)(); 7 | 8 | struct RaiseExceptionMessageBuilder { 9 | static NSString * string_for_actual_value(empty_block_t value) { 10 | return [value description]; 11 | } 12 | }; 13 | 14 | class RaiseException : public Base { 15 | private: 16 | RaiseException & operator=(const RaiseException &); 17 | 18 | public: 19 | explicit RaiseException(NSObject * = nil, Class = nil, bool = false, NSString * = nil); 20 | ~RaiseException(); 21 | // Allow default copy ctor. 22 | 23 | RaiseException operator()() const; 24 | RaiseException operator()(Class) const; 25 | RaiseException operator()(NSObject *) const; 26 | 27 | RaiseException & or_subclass(); 28 | 29 | RaiseException & with_reason(NSString * const reason); 30 | RaiseException with_reason(NSString * const reason) const; 31 | 32 | bool matches(empty_block_t) const; 33 | 34 | protected: 35 | virtual NSString * failure_message_end() const; 36 | 37 | private: 38 | bool exception_matches_expected_class(NSObject * const exception) const; 39 | bool exception_matches_expected_instance(NSObject * const exception) const; 40 | bool exception_matches_expected_reason(NSObject * const exception) const; 41 | 42 | private: 43 | const NSObject *expectedExceptionInstance_; 44 | const Class expectedExceptionClass_; 45 | bool allowSubclasses_; 46 | NSString *expectedReason_; 47 | }; 48 | 49 | RaiseException raise() __attribute__((deprecated)); // Please use raise_exception 50 | RaiseException raise(); 51 | 52 | static const RaiseException raise_exception; 53 | 54 | }} 55 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/RaiseException.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | #import 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | typedef void (^empty_block_t)(); 7 | 8 | struct RaiseExceptionMessageBuilder { 9 | static NSString * string_for_actual_value(empty_block_t value) { 10 | return [value description]; 11 | } 12 | }; 13 | 14 | class RaiseException : public Base { 15 | private: 16 | RaiseException & operator=(const RaiseException &); 17 | 18 | public: 19 | explicit RaiseException(NSObject * = nil, Class = nil, bool = false, NSString * = nil); 20 | ~RaiseException(); 21 | // Allow default copy ctor. 22 | 23 | RaiseException operator()() const; 24 | RaiseException operator()(Class) const; 25 | RaiseException operator()(NSObject *) const; 26 | 27 | RaiseException & or_subclass(); 28 | 29 | RaiseException & with_reason(NSString * const reason); 30 | RaiseException with_reason(NSString * const reason) const; 31 | 32 | bool matches(empty_block_t) const; 33 | 34 | protected: 35 | virtual NSString * failure_message_end() const; 36 | 37 | private: 38 | bool exception_matches_expected_class(NSObject * const exception) const; 39 | bool exception_matches_expected_instance(NSObject * const exception) const; 40 | bool exception_matches_expected_reason(NSObject * const exception) const; 41 | 42 | private: 43 | const NSObject *expectedExceptionInstance_; 44 | const Class expectedExceptionClass_; 45 | bool allowSubclasses_; 46 | NSString *expectedReason_; 47 | }; 48 | 49 | RaiseException raise() __attribute__((deprecated)); // Please use raise_exception 50 | RaiseException raise(); 51 | 52 | static const RaiseException raise_exception; 53 | 54 | }} 55 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/BeSameInstanceAs.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | template 6 | class BeSameInstanceAs : public Base<> { 7 | private: 8 | BeSameInstanceAs & operator=(const BeSameInstanceAs &); 9 | 10 | public: 11 | explicit BeSameInstanceAs(T * const expectedValue); 12 | ~BeSameInstanceAs(); 13 | // Allow default copy ctor. 14 | 15 | template 16 | bool matches(const U &) const; 17 | 18 | template 19 | bool matches(U * const &) const; 20 | 21 | protected: 22 | virtual NSString * failure_message_end() const; 23 | 24 | private: 25 | const T * expectedValue_; 26 | }; 27 | 28 | template 29 | BeSameInstanceAs be_same_instance_as(T * const expectedValue) { 30 | return BeSameInstanceAs(expectedValue); 31 | } 32 | 33 | template 34 | BeSameInstanceAs::BeSameInstanceAs(T * const expectedValue) 35 | : Base<>(), expectedValue_(expectedValue) { 36 | } 37 | 38 | template 39 | BeSameInstanceAs::~BeSameInstanceAs() { 40 | } 41 | 42 | template 43 | /*virtual*/ NSString * BeSameInstanceAs::failure_message_end() const { 44 | return [NSString stringWithFormat:@"be same instance as <%p>", expectedValue_]; 45 | } 46 | 47 | #pragma mark Generic 48 | template template 49 | bool BeSameInstanceAs::matches(const U & actualValue) const { 50 | [[CDRSpecFailure specFailureWithReason:@"Attempt to compare non-pointer type for sameness."] raise]; 51 | return NO; 52 | } 53 | 54 | template template 55 | bool BeSameInstanceAs::matches(U * const & actualValue) const { 56 | return actualValue == expectedValue_; 57 | } 58 | 59 | }} 60 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/BeSameInstanceAs.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | template 6 | class BeSameInstanceAs : public Base<> { 7 | private: 8 | BeSameInstanceAs & operator=(const BeSameInstanceAs &); 9 | 10 | public: 11 | explicit BeSameInstanceAs(T * const expectedValue); 12 | ~BeSameInstanceAs(); 13 | // Allow default copy ctor. 14 | 15 | template 16 | bool matches(const U &) const; 17 | 18 | template 19 | bool matches(U * const &) const; 20 | 21 | protected: 22 | virtual NSString * failure_message_end() const; 23 | 24 | private: 25 | const T * expectedValue_; 26 | }; 27 | 28 | template 29 | BeSameInstanceAs be_same_instance_as(T * const expectedValue) { 30 | return BeSameInstanceAs(expectedValue); 31 | } 32 | 33 | template 34 | BeSameInstanceAs::BeSameInstanceAs(T * const expectedValue) 35 | : Base<>(), expectedValue_(expectedValue) { 36 | } 37 | 38 | template 39 | BeSameInstanceAs::~BeSameInstanceAs() { 40 | } 41 | 42 | template 43 | /*virtual*/ NSString * BeSameInstanceAs::failure_message_end() const { 44 | return [NSString stringWithFormat:@"be same instance as <%p>", expectedValue_]; 45 | } 46 | 47 | #pragma mark Generic 48 | template template 49 | bool BeSameInstanceAs::matches(const U & actualValue) const { 50 | [[CDRSpecFailure specFailureWithReason:@"Attempt to compare non-pointer type for sameness."] raise]; 51 | return NO; 52 | } 53 | 54 | template template 55 | bool BeSameInstanceAs::matches(U * const & actualValue) const { 56 | return actualValue == expectedValue_; 57 | } 58 | 59 | }} 60 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/BeSameInstanceAs.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | template 6 | class BeSameInstanceAs : public Base<> { 7 | private: 8 | BeSameInstanceAs & operator=(const BeSameInstanceAs &); 9 | 10 | public: 11 | explicit BeSameInstanceAs(T * const expectedValue); 12 | ~BeSameInstanceAs(); 13 | // Allow default copy ctor. 14 | 15 | template 16 | bool matches(const U &) const; 17 | 18 | template 19 | bool matches(U * const &) const; 20 | 21 | protected: 22 | virtual NSString * failure_message_end() const; 23 | 24 | private: 25 | const T * expectedValue_; 26 | }; 27 | 28 | template 29 | BeSameInstanceAs be_same_instance_as(T * const expectedValue) { 30 | return BeSameInstanceAs(expectedValue); 31 | } 32 | 33 | template 34 | BeSameInstanceAs::BeSameInstanceAs(T * const expectedValue) 35 | : Base<>(), expectedValue_(expectedValue) { 36 | } 37 | 38 | template 39 | BeSameInstanceAs::~BeSameInstanceAs() { 40 | } 41 | 42 | template 43 | /*virtual*/ NSString * BeSameInstanceAs::failure_message_end() const { 44 | return [NSString stringWithFormat:@"be same instance as <%p>", expectedValue_]; 45 | } 46 | 47 | #pragma mark Generic 48 | template template 49 | bool BeSameInstanceAs::matches(const U & actualValue) const { 50 | [[CDRSpecFailure specFailureWithReason:@"Attempt to compare non-pointer type for sameness."] raise]; 51 | return NO; 52 | } 53 | 54 | template template 55 | bool BeSameInstanceAs::matches(U * const & actualValue) const { 56 | return actualValue == expectedValue_; 57 | } 58 | 59 | }} 60 | -------------------------------------------------------------------------------- /ios/capybara-touch/Private Frameworks/GraphicsServices/GSBase.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | FILE_NAME ... DESCRIPTION 4 | 5 | Copyright (c) 2009, KennyTM~ 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without modification, 9 | are permitted provided that the following conditions are met: 10 | 11 | * Redistributions of source code must retain the above copyright notice, this 12 | list of conditions and the following disclaimer. 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | * Neither the name of the KennyTM~ nor the names of its contributors may be 17 | used to endorse or promote products derived from this software without 18 | specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 21 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 22 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 24 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 27 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | */ 32 | 33 | #ifndef GSBASE_H 34 | #define GSBASE_H 35 | 36 | #include 37 | 38 | #if __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | void GSLog(CFStringRef format, ...); 43 | void GSInitialize(); 44 | 45 | #if __cplusplus 46 | } 47 | #endif 48 | 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /ios/capybara-touch/Private Frameworks/GraphicsServices/GSWindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | GSWindow.h ... Graphics Services Window. 4 | 5 | Copyright (c) 2009, KennyTM~ 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without modification, 9 | are permitted provided that the following conditions are met: 10 | 11 | * Redistributions of source code must retain the above copyright notice, this 12 | list of conditions and the following disclaimer. 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | * Neither the name of the KennyTM~ nor the names of its contributors may be 17 | used to endorse or promote products derived from this software without 18 | specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 21 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 22 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 24 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 27 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | */ 32 | 33 | #ifndef GSWINDOW_H 34 | #define GSWINDOW_H 35 | 36 | /*! 37 | @file GSWindow.h 38 | @brief ??? 39 | @author Kenny TM~ 40 | @date 2009 Sep 16 41 | 42 | */ 43 | 44 | #if __cplusplus 45 | extern "C" { 46 | #endif 47 | 48 | typedef void* GSWindowRef; 49 | 50 | #if __cplusplus 51 | } 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require 'bundler' 2 | require 'rspec/core/rake_task' 3 | require 'capybara_webkit_builder' 4 | require 'appraisal' 5 | 6 | Bundler::GemHelper.install_tasks 7 | 8 | desc "Generate a Makefile using qmake" 9 | file 'Makefile' do 10 | CapybaraWebkitBuilder.makefile or exit(1) 11 | end 12 | 13 | desc "Regenerate dependencies using qmake" 14 | task :qmake => 'Makefile' do 15 | CapybaraWebkitBuilder.qmake or exit(1) 16 | end 17 | 18 | desc "Build the webkit server" 19 | task :build => :qmake do 20 | CapybaraWebkitBuilder.build or exit(1) 21 | end 22 | 23 | file 'bin/webkit_server' => :build 24 | 25 | RSpec::Core::RakeTask.new do |t| 26 | t.pattern = "spec/**/*_spec.rb" 27 | t.rspec_opts = "--format progress" 28 | end 29 | 30 | desc "Default: build and run all specs" 31 | task :default => [:build, :spec] 32 | 33 | desc "Generate a new command called NAME" 34 | task :generate_command do 35 | name = ENV['NAME'] or raise "Provide a name with NAME=" 36 | 37 | header = "src/#{name}.h" 38 | source = "src/#{name}.cpp" 39 | 40 | %w(h cpp).each do |extension| 41 | File.open("templates/Command.#{extension}", "r") do |source_file| 42 | contents = source_file.read 43 | contents.gsub!("NAME", name) 44 | File.open("src/#{name}.#{extension}", "w") do |target_file| 45 | target_file.write(contents) 46 | end 47 | end 48 | end 49 | 50 | Dir.glob("src/*.pro").each do |project_file_name| 51 | project = IO.read(project_file_name) 52 | project.gsub!(/^(HEADERS = .*)/, "\\1\n #{name}.h \\") 53 | project.gsub!(/^(SOURCES = .*)/, "\\1\n #{name}.cpp \\") 54 | File.open(project_file_name, "w") { |file| file.write(project) } 55 | end 56 | 57 | File.open("src/find_command.h", "a") do |file| 58 | file.write("CHECK_COMMAND(#{name})\n") 59 | end 60 | 61 | command_factory_file_name = "src/CommandFactory.cpp" 62 | command_factory = IO.read(command_factory_file_name) 63 | command_factory.sub!(/^$/, "#include \"#{name}.h\"\n") 64 | File.open(command_factory_file_name, "w") { |file| file.write(command_factory) } 65 | end 66 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/StringifiersContainer.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | namespace Cedar { namespace Matchers { namespace Stringifiers { 6 | namespace { 7 | template 8 | NSString * comma_and_newline_delimited_list(const Container & container) { 9 | NSMutableString *result = [NSMutableString string]; 10 | bool first = true; 11 | for (typename Container::const_iterator it = container.begin(); it != container.end(); ++it, first = false) { 12 | if (!first) { 13 | [result appendString:@","]; 14 | } 15 | 16 | NSString * string = string_for(*it); 17 | [result appendString:[NSString stringWithFormat:@"\n %@", string]]; 18 | } 19 | return result; 20 | } 21 | } 22 | 23 | template 24 | NSString * string_for(const typename std::vector & container) { 25 | NSString * delimitedList = comma_and_newline_delimited_list(container); 26 | return [NSString stringWithFormat:@"(%@\n)", delimitedList]; 27 | } 28 | 29 | template 30 | NSString * string_for(const typename std::map & container) { 31 | NSMutableString *result = [NSMutableString stringWithString:@"{"]; 32 | 33 | for (typename std::map::const_iterator it = container.begin(); it != container.end(); ++it) { 34 | NSString * keyString = string_for(it->first); 35 | NSString * valueString = string_for(it->second); 36 | [result appendString:[NSString stringWithFormat:@"\n %@ = %@;", keyString, valueString]]; 37 | } 38 | [result appendString:@"\n}"]; 39 | return result; 40 | } 41 | 42 | template 43 | NSString * string_for(const typename std::set & container) { 44 | NSString * delimitedList = comma_and_newline_delimited_list(container); 45 | return [NSString stringWithFormat:@"{(%@\n)}", delimitedList]; 46 | } 47 | }}} 48 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/StringifiersContainer.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | namespace Cedar { namespace Matchers { namespace Stringifiers { 6 | namespace { 7 | template 8 | NSString * comma_and_newline_delimited_list(const Container & container) { 9 | NSMutableString *result = [NSMutableString string]; 10 | bool first = true; 11 | for (typename Container::const_iterator it = container.begin(); it != container.end(); ++it, first = false) { 12 | if (!first) { 13 | [result appendString:@","]; 14 | } 15 | 16 | NSString * string = string_for(*it); 17 | [result appendString:[NSString stringWithFormat:@"\n %@", string]]; 18 | } 19 | return result; 20 | } 21 | } 22 | 23 | template 24 | NSString * string_for(const typename std::vector & container) { 25 | NSString * delimitedList = comma_and_newline_delimited_list(container); 26 | return [NSString stringWithFormat:@"(%@\n)", delimitedList]; 27 | } 28 | 29 | template 30 | NSString * string_for(const typename std::map & container) { 31 | NSMutableString *result = [NSMutableString stringWithString:@"{"]; 32 | 33 | for (typename std::map::const_iterator it = container.begin(); it != container.end(); ++it) { 34 | NSString * keyString = string_for(it->first); 35 | NSString * valueString = string_for(it->second); 36 | [result appendString:[NSString stringWithFormat:@"\n %@ = %@;", keyString, valueString]]; 37 | } 38 | [result appendString:@"\n}"]; 39 | return result; 40 | } 41 | 42 | template 43 | NSString * string_for(const typename std::set & container) { 44 | NSString * delimitedList = comma_and_newline_delimited_list(container); 45 | return [NSString stringWithFormat:@"{(%@\n)}", delimitedList]; 46 | } 47 | }}} 48 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/StringifiersContainer.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | namespace Cedar { namespace Matchers { namespace Stringifiers { 6 | namespace { 7 | template 8 | NSString * comma_and_newline_delimited_list(const Container & container) { 9 | NSMutableString *result = [NSMutableString string]; 10 | bool first = true; 11 | for (typename Container::const_iterator it = container.begin(); it != container.end(); ++it, first = false) { 12 | if (!first) { 13 | [result appendString:@","]; 14 | } 15 | 16 | NSString * string = string_for(*it); 17 | [result appendString:[NSString stringWithFormat:@"\n %@", string]]; 18 | } 19 | return result; 20 | } 21 | } 22 | 23 | template 24 | NSString * string_for(const typename std::vector & container) { 25 | NSString * delimitedList = comma_and_newline_delimited_list(container); 26 | return [NSString stringWithFormat:@"(%@\n)", delimitedList]; 27 | } 28 | 29 | template 30 | NSString * string_for(const typename std::map & container) { 31 | NSMutableString *result = [NSMutableString stringWithString:@"{"]; 32 | 33 | for (typename std::map::const_iterator it = container.begin(); it != container.end(); ++it) { 34 | NSString * keyString = string_for(it->first); 35 | NSString * valueString = string_for(it->second); 36 | [result appendString:[NSString stringWithFormat:@"\n %@ = %@;", keyString, valueString]]; 37 | } 38 | [result appendString:@"\n}"]; 39 | return result; 40 | } 41 | 42 | template 43 | NSString * string_for(const typename std::set & container) { 44 | NSString * delimitedList = comma_and_newline_delimited_list(container); 45 | return [NSString stringWithFormat:@"{(%@\n)}", delimitedList]; 46 | } 47 | }}} 48 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/BeGreaterThan.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | template 7 | class BeGreaterThan : public Base<> { 8 | private: 9 | BeGreaterThan & operator=(const BeGreaterThan &); 10 | 11 | public: 12 | explicit BeGreaterThan(const T & expectedValue); 13 | ~BeGreaterThan(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | virtual NSString * failure_message_end() const; 21 | 22 | private: 23 | const T & expectedValue_; 24 | }; 25 | 26 | template 27 | BeGreaterThan be_greater_than(const T & expectedValue) { 28 | return BeGreaterThan(expectedValue); 29 | } 30 | 31 | template 32 | BeGreaterThan::BeGreaterThan(const T & expectedValue) 33 | : Base<>(), expectedValue_(expectedValue) { 34 | } 35 | 36 | template 37 | BeGreaterThan::~BeGreaterThan() { 38 | } 39 | 40 | template 41 | /*virtual*/ NSString * BeGreaterThan::failure_message_end() const { 42 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 43 | return [NSString stringWithFormat:@"be greater than <%@>", expectedValueString]; 44 | } 45 | 46 | template template 47 | bool BeGreaterThan::matches(const U & actualValue) const { 48 | return Comparators::compare_greater_than(actualValue, expectedValue_); 49 | } 50 | 51 | #pragma mark operators 52 | template 53 | bool operator>(const ActualValue & actualValue, const U & expectedValue) { 54 | return actualValue.to > expectedValue; 55 | } 56 | 57 | template 58 | bool operator>(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 59 | actualValueMatchProxy(be_greater_than(expectedValue)); 60 | return true; 61 | } 62 | }} 63 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/BeLessThan.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | template 7 | class BeLessThan : public Base<> { 8 | private: 9 | BeLessThan & operator=(const BeLessThan &); 10 | 11 | public: 12 | explicit BeLessThan(const T & expectedValue); 13 | ~BeLessThan(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | virtual NSString * failure_message_end() const; 21 | 22 | private: 23 | const T & expectedValue_; 24 | }; 25 | 26 | template 27 | BeLessThan be_less_than(const T & expectedValue) { 28 | return BeLessThan(expectedValue); 29 | } 30 | 31 | template 32 | BeLessThan::BeLessThan(const T & expectedValue) 33 | : Base<>(), expectedValue_(expectedValue) { 34 | } 35 | 36 | template 37 | BeLessThan::~BeLessThan() { 38 | } 39 | 40 | template 41 | /*virtual*/ NSString * BeLessThan::failure_message_end() const { 42 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 43 | return [NSString stringWithFormat:@"be less than <%@>", expectedValueString]; 44 | } 45 | 46 | template template 47 | bool BeLessThan::matches(const U & actualValue) const { 48 | return !Comparators::compare_greater_than(actualValue, expectedValue_) && !Comparators::compare_equal(actualValue, expectedValue_); 49 | } 50 | 51 | #pragma mark operators 52 | template 53 | bool operator<(const ActualValue & actualValue, const U & expectedValue) { 54 | return actualValue.to < expectedValue; 55 | } 56 | 57 | template 58 | bool operator<(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 59 | actualValueMatchProxy(be_less_than(expectedValue)); 60 | return true; 61 | } 62 | }} 63 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/BeGreaterThan.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | template 7 | class BeGreaterThan : public Base<> { 8 | private: 9 | BeGreaterThan & operator=(const BeGreaterThan &); 10 | 11 | public: 12 | explicit BeGreaterThan(const T & expectedValue); 13 | ~BeGreaterThan(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | virtual NSString * failure_message_end() const; 21 | 22 | private: 23 | const T & expectedValue_; 24 | }; 25 | 26 | template 27 | BeGreaterThan be_greater_than(const T & expectedValue) { 28 | return BeGreaterThan(expectedValue); 29 | } 30 | 31 | template 32 | BeGreaterThan::BeGreaterThan(const T & expectedValue) 33 | : Base<>(), expectedValue_(expectedValue) { 34 | } 35 | 36 | template 37 | BeGreaterThan::~BeGreaterThan() { 38 | } 39 | 40 | template 41 | /*virtual*/ NSString * BeGreaterThan::failure_message_end() const { 42 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 43 | return [NSString stringWithFormat:@"be greater than <%@>", expectedValueString]; 44 | } 45 | 46 | template template 47 | bool BeGreaterThan::matches(const U & actualValue) const { 48 | return Comparators::compare_greater_than(actualValue, expectedValue_); 49 | } 50 | 51 | #pragma mark operators 52 | template 53 | bool operator>(const ActualValue & actualValue, const U & expectedValue) { 54 | return actualValue.to > expectedValue; 55 | } 56 | 57 | template 58 | bool operator>(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 59 | actualValueMatchProxy(be_greater_than(expectedValue)); 60 | return true; 61 | } 62 | }} 63 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/BeGreaterThan.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | template 7 | class BeGreaterThan : public Base<> { 8 | private: 9 | BeGreaterThan & operator=(const BeGreaterThan &); 10 | 11 | public: 12 | explicit BeGreaterThan(const T & expectedValue); 13 | ~BeGreaterThan(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | virtual NSString * failure_message_end() const; 21 | 22 | private: 23 | const T & expectedValue_; 24 | }; 25 | 26 | template 27 | BeGreaterThan be_greater_than(const T & expectedValue) { 28 | return BeGreaterThan(expectedValue); 29 | } 30 | 31 | template 32 | BeGreaterThan::BeGreaterThan(const T & expectedValue) 33 | : Base<>(), expectedValue_(expectedValue) { 34 | } 35 | 36 | template 37 | BeGreaterThan::~BeGreaterThan() { 38 | } 39 | 40 | template 41 | /*virtual*/ NSString * BeGreaterThan::failure_message_end() const { 42 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 43 | return [NSString stringWithFormat:@"be greater than <%@>", expectedValueString]; 44 | } 45 | 46 | template template 47 | bool BeGreaterThan::matches(const U & actualValue) const { 48 | return Comparators::compare_greater_than(actualValue, expectedValue_); 49 | } 50 | 51 | #pragma mark operators 52 | template 53 | bool operator>(const ActualValue & actualValue, const U & expectedValue) { 54 | return actualValue.to > expectedValue; 55 | } 56 | 57 | template 58 | bool operator>(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 59 | actualValueMatchProxy(be_greater_than(expectedValue)); 60 | return true; 61 | } 62 | }} 63 | -------------------------------------------------------------------------------- /ios/Rakefile: -------------------------------------------------------------------------------- 1 | 2 | CONFIGURATION = "Debug" 3 | PROJECT_NAME = 'capybara-touch' 4 | APP_TARGET_NAME = 'capybara-touch' 5 | 6 | SDK_VERSION = "6.1" 7 | PROJECT_ROOT = File.dirname(__FILE__) 8 | BUILD_DIR = File.join(PROJECT_ROOT, "build") 9 | 10 | Kernel.trap("EXIT") do 11 | kill_simulator 12 | end 13 | 14 | def sdk_dir 15 | "#{xcode_developer_dir}/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator#{SDK_VERSION}.sdk" 16 | end 17 | 18 | # Xcode 4.3 stores its /Developer inside /Applications/Xcode.app, Xcode 4.2 stored it in /Developer 19 | def xcode_developer_dir 20 | `xcode-select -print-path`.strip 21 | end 22 | 23 | def build_dir(effective_platform_name) 24 | File.join(BUILD_DIR, CONFIGURATION + effective_platform_name) 25 | end 26 | 27 | def system_or_exit(cmd, stdout = nil) 28 | puts "Executing #{cmd}" 29 | cmd += " >#{stdout}" if stdout 30 | system(cmd) or raise "******** Build failed ********" 31 | end 32 | 33 | def kill_simulator 34 | system %Q[killall -m -KILL "gdb"] 35 | system %Q[killall -m -KILL "otest"] 36 | system %Q[killall -m -KILL "iPhone Simulator"] 37 | system %Q[killall -m -KILL "iPad Simulator"] 38 | end 39 | 40 | def output_file(target) 41 | output_dir = if ENV['IS_CI_BOX'] 42 | ENV['CC_BUILD_ARTIFACTS'] 43 | else 44 | Dir.mkdir(BUILD_DIR) unless File.exists?(BUILD_DIR) 45 | BUILD_DIR 46 | end 47 | 48 | output_file = File.join(output_dir, "#{target}.output") 49 | puts "Output: #{output_file}" 50 | output_file 51 | end 52 | 53 | desc "Build app" 54 | task :build do 55 | system_or_exit "xcodebuild -workspace #{PROJECT_NAME}.xcworkspace -scheme #{APP_TARGET_NAME} -configuration #{CONFIGURATION} -sdk iphonesimulator build CONFIGURATION_BUILD_DIR=#{build_dir("-iphonesimulator")}", output_file("app_build") 56 | end 57 | 58 | require 'tmpdir' 59 | 60 | desc "Run app" 61 | task :run => :build do 62 | ENV["DEVICE"] = "iphone" if ENV["DEVICE"].nil? 63 | return unless ["ipad", "iphone"].include?(ENV["DEVICE"]) 64 | 65 | kill_simulator 66 | system_or_exit "ios-sim launch #{File.join(build_dir("-iphonesimulator"), "#{APP_TARGET_NAME}.app")} --sdk 6.1 --family #{ENV["DEVICE"]}" 67 | end 68 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/BeLessThan.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | template 7 | class BeLessThan : public Base<> { 8 | private: 9 | BeLessThan & operator=(const BeLessThan &); 10 | 11 | public: 12 | explicit BeLessThan(const T & expectedValue); 13 | ~BeLessThan(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | virtual NSString * failure_message_end() const; 21 | 22 | private: 23 | const T & expectedValue_; 24 | }; 25 | 26 | template 27 | BeLessThan be_less_than(const T & expectedValue) { 28 | return BeLessThan(expectedValue); 29 | } 30 | 31 | template 32 | BeLessThan::BeLessThan(const T & expectedValue) 33 | : Base<>(), expectedValue_(expectedValue) { 34 | } 35 | 36 | template 37 | BeLessThan::~BeLessThan() { 38 | } 39 | 40 | template 41 | /*virtual*/ NSString * BeLessThan::failure_message_end() const { 42 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 43 | return [NSString stringWithFormat:@"be less than <%@>", expectedValueString]; 44 | } 45 | 46 | template template 47 | bool BeLessThan::matches(const U & actualValue) const { 48 | return !Comparators::compare_greater_than(actualValue, expectedValue_) && !Comparators::compare_equal(actualValue, expectedValue_); 49 | } 50 | 51 | #pragma mark operators 52 | template 53 | bool operator<(const ActualValue & actualValue, const U & expectedValue) { 54 | return actualValue.to < expectedValue; 55 | } 56 | 57 | template 58 | bool operator<(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 59 | actualValueMatchProxy(be_less_than(expectedValue)); 60 | return true; 61 | } 62 | }} 63 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/BeLessThan.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | template 7 | class BeLessThan : public Base<> { 8 | private: 9 | BeLessThan & operator=(const BeLessThan &); 10 | 11 | public: 12 | explicit BeLessThan(const T & expectedValue); 13 | ~BeLessThan(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | virtual NSString * failure_message_end() const; 21 | 22 | private: 23 | const T & expectedValue_; 24 | }; 25 | 26 | template 27 | BeLessThan be_less_than(const T & expectedValue) { 28 | return BeLessThan(expectedValue); 29 | } 30 | 31 | template 32 | BeLessThan::BeLessThan(const T & expectedValue) 33 | : Base<>(), expectedValue_(expectedValue) { 34 | } 35 | 36 | template 37 | BeLessThan::~BeLessThan() { 38 | } 39 | 40 | template 41 | /*virtual*/ NSString * BeLessThan::failure_message_end() const { 42 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 43 | return [NSString stringWithFormat:@"be less than <%@>", expectedValueString]; 44 | } 45 | 46 | template template 47 | bool BeLessThan::matches(const U & actualValue) const { 48 | return !Comparators::compare_greater_than(actualValue, expectedValue_) && !Comparators::compare_equal(actualValue, expectedValue_); 49 | } 50 | 51 | #pragma mark operators 52 | template 53 | bool operator<(const ActualValue & actualValue, const U & expectedValue) { 54 | return actualValue.to < expectedValue; 55 | } 56 | 57 | template 58 | bool operator<(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 59 | actualValueMatchProxy(be_less_than(expectedValue)); 60 | return true; 61 | } 62 | }} 63 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/BeLTE.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | template 7 | class BeLTE : public Base<> { 8 | private: 9 | BeLTE & operator=(const BeLTE &); 10 | 11 | public: 12 | explicit BeLTE(const T & expectedValue); 13 | ~BeLTE(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | virtual NSString * failure_message_end() const; 21 | 22 | private: 23 | const T & expectedValue_; 24 | }; 25 | 26 | template 27 | BeLTE be_lte(const T & expectedValue) { 28 | return BeLTE(expectedValue); 29 | } 30 | 31 | template 32 | BeLTE be_less_than_or_equal_to(const T & expectedValue) { 33 | return be_lte(expectedValue); 34 | } 35 | 36 | template 37 | BeLTE::BeLTE(const T & expectedValue) 38 | : Base<>(), expectedValue_(expectedValue) { 39 | } 40 | 41 | template 42 | BeLTE::~BeLTE() { 43 | } 44 | 45 | template 46 | /*virtual*/ NSString * BeLTE::failure_message_end() const { 47 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 48 | return [NSString stringWithFormat:@"be less than or equal to <%@>", expectedValueString]; 49 | } 50 | 51 | template template 52 | bool BeLTE::matches(const U & actualValue) const { 53 | return !Comparators::compare_greater_than(actualValue, expectedValue_); 54 | } 55 | 56 | #pragma mark operators 57 | template 58 | bool operator<=(const ActualValue & actualValue, const U & expectedValue) { 59 | return actualValue.to <= expectedValue; 60 | } 61 | 62 | template 63 | bool operator<=(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 64 | actualValueMatchProxy(be_lte(expectedValue)); 65 | return true; 66 | } 67 | }} 68 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/BeLTE.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | template 7 | class BeLTE : public Base<> { 8 | private: 9 | BeLTE & operator=(const BeLTE &); 10 | 11 | public: 12 | explicit BeLTE(const T & expectedValue); 13 | ~BeLTE(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | virtual NSString * failure_message_end() const; 21 | 22 | private: 23 | const T & expectedValue_; 24 | }; 25 | 26 | template 27 | BeLTE be_lte(const T & expectedValue) { 28 | return BeLTE(expectedValue); 29 | } 30 | 31 | template 32 | BeLTE be_less_than_or_equal_to(const T & expectedValue) { 33 | return be_lte(expectedValue); 34 | } 35 | 36 | template 37 | BeLTE::BeLTE(const T & expectedValue) 38 | : Base<>(), expectedValue_(expectedValue) { 39 | } 40 | 41 | template 42 | BeLTE::~BeLTE() { 43 | } 44 | 45 | template 46 | /*virtual*/ NSString * BeLTE::failure_message_end() const { 47 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 48 | return [NSString stringWithFormat:@"be less than or equal to <%@>", expectedValueString]; 49 | } 50 | 51 | template template 52 | bool BeLTE::matches(const U & actualValue) const { 53 | return !Comparators::compare_greater_than(actualValue, expectedValue_); 54 | } 55 | 56 | #pragma mark operators 57 | template 58 | bool operator<=(const ActualValue & actualValue, const U & expectedValue) { 59 | return actualValue.to <= expectedValue; 60 | } 61 | 62 | template 63 | bool operator<=(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 64 | actualValueMatchProxy(be_lte(expectedValue)); 65 | return true; 66 | } 67 | }} 68 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/BeLTE.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | template 7 | class BeLTE : public Base<> { 8 | private: 9 | BeLTE & operator=(const BeLTE &); 10 | 11 | public: 12 | explicit BeLTE(const T & expectedValue); 13 | ~BeLTE(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | virtual NSString * failure_message_end() const; 21 | 22 | private: 23 | const T & expectedValue_; 24 | }; 25 | 26 | template 27 | BeLTE be_lte(const T & expectedValue) { 28 | return BeLTE(expectedValue); 29 | } 30 | 31 | template 32 | BeLTE be_less_than_or_equal_to(const T & expectedValue) { 33 | return be_lte(expectedValue); 34 | } 35 | 36 | template 37 | BeLTE::BeLTE(const T & expectedValue) 38 | : Base<>(), expectedValue_(expectedValue) { 39 | } 40 | 41 | template 42 | BeLTE::~BeLTE() { 43 | } 44 | 45 | template 46 | /*virtual*/ NSString * BeLTE::failure_message_end() const { 47 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 48 | return [NSString stringWithFormat:@"be less than or equal to <%@>", expectedValueString]; 49 | } 50 | 51 | template template 52 | bool BeLTE::matches(const U & actualValue) const { 53 | return !Comparators::compare_greater_than(actualValue, expectedValue_); 54 | } 55 | 56 | #pragma mark operators 57 | template 58 | bool operator<=(const ActualValue & actualValue, const U & expectedValue) { 59 | return actualValue.to <= expectedValue; 60 | } 61 | 62 | template 63 | bool operator<=(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 64 | actualValueMatchProxy(be_lte(expectedValue)); 65 | return true; 66 | } 67 | }} 68 | -------------------------------------------------------------------------------- /ios/capybara-touch/Private Frameworks/GraphicsServices/GSStatusBar.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | GSStatusBar.h ... Manipulating the status bar 4 | 5 | Copyright (c) 2009 KennyTM~ 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without modification, 9 | are permitted provided that the following conditions are met: 10 | 11 | * Redistributions of source code must retain the above copyright notice, this 12 | list of conditions and the following disclaimer. 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | * Neither the name of the KennyTM~ nor the names of its contributors may be 17 | used to endorse or promote products derived from this software without 18 | specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 21 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 22 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 24 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 27 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | */ 32 | 33 | #ifndef GSSTATUSBAR_H 34 | #define GSSTATUSBAR_H 35 | 36 | #include 37 | #include "Availability2.h" 38 | 39 | #if __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_3_2 40 | 41 | #if __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | CGFloat GSStatusBarHeight(); 46 | CGFloat GSDefaultStatusBarHeight(); // = 20 47 | CGFloat GSSetStatusBarHeight(CGFloat newHeight); 48 | 49 | #if __cplusplus 50 | } 51 | #endif 52 | 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/Base.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "CedarStringifiers.h" 5 | 6 | namespace Cedar { namespace Matchers { 7 | struct BaseMessageBuilder { 8 | template 9 | static NSString * string_for_actual_value(const U & value) { 10 | return Stringifiers::string_for(value); 11 | } 12 | }; 13 | 14 | /** 15 | * Basic functionality for all matchers. Meant to be used as a convenience base class for 16 | * matcher classes. 17 | */ 18 | template 19 | class Base { 20 | private: 21 | Base & operator=(const Base &); 22 | 23 | public: 24 | Base(); 25 | virtual ~Base() = 0; 26 | // Allow default copy ctor. 27 | 28 | template 29 | NSString * failure_message_for(const U &) const; 30 | template 31 | NSString * negative_failure_message_for(const U &) const; 32 | 33 | protected: 34 | virtual NSString * failure_message_end() const = 0; 35 | }; 36 | 37 | template 38 | Base::Base() {} 39 | template 40 | Base::~Base() {} 41 | 42 | template template 43 | NSString * Base::failure_message_for(const U & value) const { 44 | NSString * failureMessageEnd = this->failure_message_end(); 45 | NSString * actualValueString = MessageBuilder_::string_for_actual_value(value); 46 | return [NSString stringWithFormat:@"Expected <%@> to %@", actualValueString, failureMessageEnd]; 47 | } 48 | 49 | template template 50 | NSString * Base::negative_failure_message_for(const U & value) const { 51 | NSString * failureMessageEnd = this->failure_message_end(); 52 | NSString * actualValueString = MessageBuilder_::string_for_actual_value(value); 53 | return [NSString stringWithFormat:@"Expected <%@> to not %@", actualValueString, failureMessageEnd]; 54 | } 55 | }} 56 | -------------------------------------------------------------------------------- /spec/support/app_runner.rb: -------------------------------------------------------------------------------- 1 | # Boots a single Capybara::Server for a Rack application that delegates to another, singleton Rack 2 | # application that can be configured for each spec. 3 | 4 | require 'sinatra/base' 5 | 6 | module AppRunner 7 | class << self 8 | attr_accessor :app, :app_host 9 | end 10 | 11 | def self.boot 12 | app_container = lambda { |env| AppRunner.app.call(env) } 13 | server = Capybara::Server.new(app_container) 14 | server.boot 15 | self.app_host = "http://127.0.0.1:#{server.port}" 16 | end 17 | 18 | def self.reset 19 | self.app = lambda do |env| 20 | [200, { 'Content-Type' => 'html', 'Content-Length' => 0 }, []] 21 | end 22 | end 23 | 24 | def run_application(app) 25 | AppRunner.app = app 26 | end 27 | 28 | def driver_for_app(&body) 29 | app = Class.new(ExampleApp, &body) 30 | run_application app 31 | build_driver 32 | end 33 | 34 | def driver_for_html(html) 35 | run_application_for_html html 36 | build_driver 37 | end 38 | 39 | def run_application_for_html(html) 40 | run_application lambda { |env| 41 | [200, { 'Content-Type' => 'text/html', 'Content-Length' => html.size.to_s }, [html]] 42 | } 43 | end 44 | 45 | private 46 | 47 | def build_driver 48 | Capybara::Touch::Driver.new(AppRunner.app, :browser => $webkit_browser) 49 | end 50 | 51 | def self.included(example_group) 52 | example_group.class_eval do 53 | before { AppRunner.reset } 54 | after { $webkit_browser.reset! } 55 | end 56 | end 57 | end 58 | 59 | class ExampleApp < Sinatra::Base 60 | # Sinatra fixes invalid responses that would break QWebPage, so this middleware breaks them again 61 | # for testing purposes. 62 | class ResponseInvalidator 63 | def initialize(app) 64 | @app = app 65 | end 66 | 67 | def call(env) 68 | response = @app.call(env) 69 | if response.to_a[1]['X-Response-Invalid'] 70 | [404, {}, []] 71 | else 72 | response 73 | end 74 | end 75 | end 76 | 77 | use ResponseInvalidator 78 | 79 | def invalid_response 80 | [200, { 'X-Response-Invalid' => 'TRUE' }, []] 81 | end 82 | end 83 | 84 | AppRunner.boot 85 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/Base.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "CedarStringifiers.h" 5 | 6 | namespace Cedar { namespace Matchers { 7 | struct BaseMessageBuilder { 8 | template 9 | static NSString * string_for_actual_value(const U & value) { 10 | return Stringifiers::string_for(value); 11 | } 12 | }; 13 | 14 | /** 15 | * Basic functionality for all matchers. Meant to be used as a convenience base class for 16 | * matcher classes. 17 | */ 18 | template 19 | class Base { 20 | private: 21 | Base & operator=(const Base &); 22 | 23 | public: 24 | Base(); 25 | virtual ~Base() = 0; 26 | // Allow default copy ctor. 27 | 28 | template 29 | NSString * failure_message_for(const U &) const; 30 | template 31 | NSString * negative_failure_message_for(const U &) const; 32 | 33 | protected: 34 | virtual NSString * failure_message_end() const = 0; 35 | }; 36 | 37 | template 38 | Base::Base() {} 39 | template 40 | Base::~Base() {} 41 | 42 | template template 43 | NSString * Base::failure_message_for(const U & value) const { 44 | NSString * failureMessageEnd = this->failure_message_end(); 45 | NSString * actualValueString = MessageBuilder_::string_for_actual_value(value); 46 | return [NSString stringWithFormat:@"Expected <%@> to %@", actualValueString, failureMessageEnd]; 47 | } 48 | 49 | template template 50 | NSString * Base::negative_failure_message_for(const U & value) const { 51 | NSString * failureMessageEnd = this->failure_message_end(); 52 | NSString * actualValueString = MessageBuilder_::string_for_actual_value(value); 53 | return [NSString stringWithFormat:@"Expected <%@> to not %@", actualValueString, failureMessageEnd]; 54 | } 55 | }} 56 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/Base.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "CedarStringifiers.h" 5 | 6 | namespace Cedar { namespace Matchers { 7 | struct BaseMessageBuilder { 8 | template 9 | static NSString * string_for_actual_value(const U & value) { 10 | return Stringifiers::string_for(value); 11 | } 12 | }; 13 | 14 | /** 15 | * Basic functionality for all matchers. Meant to be used as a convenience base class for 16 | * matcher classes. 17 | */ 18 | template 19 | class Base { 20 | private: 21 | Base & operator=(const Base &); 22 | 23 | public: 24 | Base(); 25 | virtual ~Base() = 0; 26 | // Allow default copy ctor. 27 | 28 | template 29 | NSString * failure_message_for(const U &) const; 30 | template 31 | NSString * negative_failure_message_for(const U &) const; 32 | 33 | protected: 34 | virtual NSString * failure_message_end() const = 0; 35 | }; 36 | 37 | template 38 | Base::Base() {} 39 | template 40 | Base::~Base() {} 41 | 42 | template template 43 | NSString * Base::failure_message_for(const U & value) const { 44 | NSString * failureMessageEnd = this->failure_message_end(); 45 | NSString * actualValueString = MessageBuilder_::string_for_actual_value(value); 46 | return [NSString stringWithFormat:@"Expected <%@> to %@", actualValueString, failureMessageEnd]; 47 | } 48 | 49 | template template 50 | NSString * Base::negative_failure_message_for(const U & value) const { 51 | NSString * failureMessageEnd = this->failure_message_end(); 52 | NSString * actualValueString = MessageBuilder_::string_for_actual_value(value); 53 | return [NSString stringWithFormat:@"Expected <%@> to not %@", actualValueString, failureMessageEnd]; 54 | } 55 | }} 56 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/BeGTE.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | template 7 | class BeGTE : public Base<> { 8 | private: 9 | BeGTE & operator=(const BeGTE &); 10 | 11 | public: 12 | explicit BeGTE(const T & expectedValue); 13 | ~BeGTE(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | virtual NSString * failure_message_end() const; 21 | 22 | private: 23 | const T & expectedValue_; 24 | }; 25 | 26 | template 27 | BeGTE be_gte(const T & expectedValue) { 28 | return BeGTE(expectedValue); 29 | } 30 | 31 | template 32 | BeGTE be_greater_than_or_equal_to(const T & expectedValue) { 33 | return be_gte(expectedValue); 34 | } 35 | 36 | template 37 | BeGTE::BeGTE(const T & expectedValue) 38 | : Base<>(), expectedValue_(expectedValue) { 39 | } 40 | 41 | template 42 | BeGTE::~BeGTE() { 43 | } 44 | 45 | template 46 | /*virtual*/ NSString * BeGTE::failure_message_end() const { 47 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 48 | return [NSString stringWithFormat:@"be greater than or equal to <%@>", expectedValueString]; 49 | } 50 | 51 | template template 52 | bool BeGTE::matches(const U & actualValue) const { 53 | return Comparators::compare_greater_than(actualValue, expectedValue_) || Comparators::compare_equal(actualValue, expectedValue_); 54 | } 55 | 56 | #pragma mark operators 57 | template 58 | bool operator>=(const ActualValue & actualValue, const U & expectedValue) { 59 | return actualValue.to >= expectedValue; 60 | } 61 | 62 | template 63 | bool operator>=(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 64 | actualValueMatchProxy(be_gte(expectedValue)); 65 | return true; 66 | } 67 | }} 68 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/CDRSpec.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRExampleBase.h" 3 | 4 | @protocol CDRExampleReporter; 5 | @class CDRExampleGroup, CDRExample, SpecHelper, CDRSymbolicator; 6 | 7 | @protocol CDRSpec 8 | @end 9 | 10 | extern const CDRSpecBlock PENDING; 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | void beforeEach(CDRSpecBlock); 16 | void afterEach(CDRSpecBlock); 17 | 18 | CDRExampleGroup * describe(NSString *, CDRSpecBlock); 19 | extern CDRExampleGroup* (*context)(NSString *, CDRSpecBlock); 20 | 21 | CDRExample * it(NSString *, CDRSpecBlock); 22 | 23 | CDRExampleGroup * xdescribe(NSString *, CDRSpecBlock); 24 | extern CDRExampleGroup* (*xcontext)(NSString *, CDRSpecBlock); 25 | void subjectAction(CDRSpecBlock); 26 | CDRExample * xit(NSString *, CDRSpecBlock); 27 | 28 | CDRExampleGroup * fdescribe(NSString *, CDRSpecBlock); 29 | extern CDRExampleGroup* (*fcontext)(NSString *, CDRSpecBlock); 30 | CDRExample * fit(NSString *, CDRSpecBlock); 31 | 32 | void fail(NSString *); 33 | #ifdef __cplusplus 34 | } 35 | 36 | #import "ActualValue.h" 37 | #import "ShouldSyntax.h" 38 | #import "CedarComparators.h" 39 | #import "CedarMatchers.h" 40 | #import "CedarDoubles.h" 41 | 42 | #endif // __cplusplus 43 | 44 | @interface CDRSpec : NSObject { 45 | CDRExampleGroup *rootGroup_; 46 | CDRExampleGroup *currentGroup_; 47 | NSString *fileName_; 48 | CDRSymbolicator *symbolicator_; 49 | } 50 | 51 | @property (nonatomic, retain) CDRExampleGroup *currentGroup, *rootGroup; 52 | @property (nonatomic, retain) NSString *fileName; 53 | @property (nonatomic, retain) CDRSymbolicator *symbolicator; 54 | 55 | - (void)defineBehaviors; 56 | - (void)markAsFocusedClosestToLineNumber:(NSUInteger)lineNumber; 57 | @end 58 | 59 | @interface CDRSpec (SpecDeclaration) 60 | - (void)declareBehaviors; 61 | @end 62 | 63 | #define SPEC_BEGIN(name) \ 64 | @interface name : CDRSpec \ 65 | @end \ 66 | @implementation name \ 67 | - (void)declareBehaviors { \ 68 | self.fileName = [NSString stringWithUTF8String:__FILE__]; 69 | 70 | #define SPEC_END \ 71 | } \ 72 | @end 73 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/BeGTE.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | template 7 | class BeGTE : public Base<> { 8 | private: 9 | BeGTE & operator=(const BeGTE &); 10 | 11 | public: 12 | explicit BeGTE(const T & expectedValue); 13 | ~BeGTE(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | virtual NSString * failure_message_end() const; 21 | 22 | private: 23 | const T & expectedValue_; 24 | }; 25 | 26 | template 27 | BeGTE be_gte(const T & expectedValue) { 28 | return BeGTE(expectedValue); 29 | } 30 | 31 | template 32 | BeGTE be_greater_than_or_equal_to(const T & expectedValue) { 33 | return be_gte(expectedValue); 34 | } 35 | 36 | template 37 | BeGTE::BeGTE(const T & expectedValue) 38 | : Base<>(), expectedValue_(expectedValue) { 39 | } 40 | 41 | template 42 | BeGTE::~BeGTE() { 43 | } 44 | 45 | template 46 | /*virtual*/ NSString * BeGTE::failure_message_end() const { 47 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 48 | return [NSString stringWithFormat:@"be greater than or equal to <%@>", expectedValueString]; 49 | } 50 | 51 | template template 52 | bool BeGTE::matches(const U & actualValue) const { 53 | return Comparators::compare_greater_than(actualValue, expectedValue_) || Comparators::compare_equal(actualValue, expectedValue_); 54 | } 55 | 56 | #pragma mark operators 57 | template 58 | bool operator>=(const ActualValue & actualValue, const U & expectedValue) { 59 | return actualValue.to >= expectedValue; 60 | } 61 | 62 | template 63 | bool operator>=(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 64 | actualValueMatchProxy(be_gte(expectedValue)); 65 | return true; 66 | } 67 | }} 68 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/BeGTE.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | template 7 | class BeGTE : public Base<> { 8 | private: 9 | BeGTE & operator=(const BeGTE &); 10 | 11 | public: 12 | explicit BeGTE(const T & expectedValue); 13 | ~BeGTE(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | virtual NSString * failure_message_end() const; 21 | 22 | private: 23 | const T & expectedValue_; 24 | }; 25 | 26 | template 27 | BeGTE be_gte(const T & expectedValue) { 28 | return BeGTE(expectedValue); 29 | } 30 | 31 | template 32 | BeGTE be_greater_than_or_equal_to(const T & expectedValue) { 33 | return be_gte(expectedValue); 34 | } 35 | 36 | template 37 | BeGTE::BeGTE(const T & expectedValue) 38 | : Base<>(), expectedValue_(expectedValue) { 39 | } 40 | 41 | template 42 | BeGTE::~BeGTE() { 43 | } 44 | 45 | template 46 | /*virtual*/ NSString * BeGTE::failure_message_end() const { 47 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 48 | return [NSString stringWithFormat:@"be greater than or equal to <%@>", expectedValueString]; 49 | } 50 | 51 | template template 52 | bool BeGTE::matches(const U & actualValue) const { 53 | return Comparators::compare_greater_than(actualValue, expectedValue_) || Comparators::compare_equal(actualValue, expectedValue_); 54 | } 55 | 56 | #pragma mark operators 57 | template 58 | bool operator>=(const ActualValue & actualValue, const U & expectedValue) { 59 | return actualValue.to >= expectedValue; 60 | } 61 | 62 | template 63 | bool operator>=(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 64 | actualValueMatchProxy(be_gte(expectedValue)); 65 | return true; 66 | } 67 | }} 68 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRSpec.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRExampleBase.h" 3 | 4 | @protocol CDRExampleReporter; 5 | @class CDRExampleGroup, CDRExample, SpecHelper, CDRSymbolicator; 6 | 7 | @protocol CDRSpec 8 | @end 9 | 10 | extern const CDRSpecBlock PENDING; 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | void beforeEach(CDRSpecBlock); 16 | void afterEach(CDRSpecBlock); 17 | 18 | CDRExampleGroup * describe(NSString *, CDRSpecBlock); 19 | extern CDRExampleGroup* (*context)(NSString *, CDRSpecBlock); 20 | 21 | CDRExample * it(NSString *, CDRSpecBlock); 22 | 23 | CDRExampleGroup * xdescribe(NSString *, CDRSpecBlock); 24 | extern CDRExampleGroup* (*xcontext)(NSString *, CDRSpecBlock); 25 | void subjectAction(CDRSpecBlock); 26 | CDRExample * xit(NSString *, CDRSpecBlock); 27 | 28 | CDRExampleGroup * fdescribe(NSString *, CDRSpecBlock); 29 | extern CDRExampleGroup* (*fcontext)(NSString *, CDRSpecBlock); 30 | CDRExample * fit(NSString *, CDRSpecBlock); 31 | 32 | void fail(NSString *); 33 | #ifdef __cplusplus 34 | } 35 | 36 | #import "ActualValue.h" 37 | #import "ShouldSyntax.h" 38 | #import "CedarComparators.h" 39 | #import "CedarMatchers.h" 40 | #import "CedarDoubles.h" 41 | 42 | #endif // __cplusplus 43 | 44 | @interface CDRSpec : NSObject { 45 | CDRExampleGroup *rootGroup_; 46 | CDRExampleGroup *currentGroup_; 47 | NSString *fileName_; 48 | CDRSymbolicator *symbolicator_; 49 | } 50 | 51 | @property (nonatomic, retain) CDRExampleGroup *currentGroup, *rootGroup; 52 | @property (nonatomic, retain) NSString *fileName; 53 | @property (nonatomic, retain) CDRSymbolicator *symbolicator; 54 | 55 | - (void)defineBehaviors; 56 | - (void)markAsFocusedClosestToLineNumber:(NSUInteger)lineNumber; 57 | @end 58 | 59 | @interface CDRSpec (SpecDeclaration) 60 | - (void)declareBehaviors; 61 | @end 62 | 63 | #define SPEC_BEGIN(name) \ 64 | @interface name : CDRSpec \ 65 | @end \ 66 | @implementation name \ 67 | - (void)declareBehaviors { \ 68 | self.fileName = [NSString stringWithUTF8String:__FILE__]; 69 | 70 | #define SPEC_END \ 71 | } \ 72 | @end 73 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRSpec.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRExampleBase.h" 3 | 4 | @protocol CDRExampleReporter; 5 | @class CDRExampleGroup, CDRExample, SpecHelper, CDRSymbolicator; 6 | 7 | @protocol CDRSpec 8 | @end 9 | 10 | extern const CDRSpecBlock PENDING; 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | void beforeEach(CDRSpecBlock); 16 | void afterEach(CDRSpecBlock); 17 | 18 | CDRExampleGroup * describe(NSString *, CDRSpecBlock); 19 | extern CDRExampleGroup* (*context)(NSString *, CDRSpecBlock); 20 | 21 | CDRExample * it(NSString *, CDRSpecBlock); 22 | 23 | CDRExampleGroup * xdescribe(NSString *, CDRSpecBlock); 24 | extern CDRExampleGroup* (*xcontext)(NSString *, CDRSpecBlock); 25 | void subjectAction(CDRSpecBlock); 26 | CDRExample * xit(NSString *, CDRSpecBlock); 27 | 28 | CDRExampleGroup * fdescribe(NSString *, CDRSpecBlock); 29 | extern CDRExampleGroup* (*fcontext)(NSString *, CDRSpecBlock); 30 | CDRExample * fit(NSString *, CDRSpecBlock); 31 | 32 | void fail(NSString *); 33 | #ifdef __cplusplus 34 | } 35 | 36 | #import "ActualValue.h" 37 | #import "ShouldSyntax.h" 38 | #import "CedarComparators.h" 39 | #import "CedarMatchers.h" 40 | #import "CedarDoubles.h" 41 | 42 | #endif // __cplusplus 43 | 44 | @interface CDRSpec : NSObject { 45 | CDRExampleGroup *rootGroup_; 46 | CDRExampleGroup *currentGroup_; 47 | NSString *fileName_; 48 | CDRSymbolicator *symbolicator_; 49 | } 50 | 51 | @property (nonatomic, retain) CDRExampleGroup *currentGroup, *rootGroup; 52 | @property (nonatomic, retain) NSString *fileName; 53 | @property (nonatomic, retain) CDRSymbolicator *symbolicator; 54 | 55 | - (void)defineBehaviors; 56 | - (void)markAsFocusedClosestToLineNumber:(NSUInteger)lineNumber; 57 | @end 58 | 59 | @interface CDRSpec (SpecDeclaration) 60 | - (void)declareBehaviors; 61 | @end 62 | 63 | #define SPEC_BEGIN(name) \ 64 | @interface name : CDRSpec \ 65 | @end \ 66 | @implementation name \ 67 | - (void)declareBehaviors { \ 68 | self.fileName = [NSString stringWithUTF8String:__FILE__]; 69 | 70 | #define SPEC_END \ 71 | } \ 72 | @end 73 | -------------------------------------------------------------------------------- /ios/capybara-touch/Private Frameworks/GraphicsServices/GSHiccup.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | GSHiccups.h ... Hiccups. 4 | 5 | Copyright (c) 2009 KennyTM~ 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without modification, 9 | are permitted provided that the following conditions are met: 10 | 11 | * Redistributions of source code must retain the above copyright notice, this 12 | list of conditions and the following disclaimer. 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | * Neither the name of the KennyTM~ nor the names of its contributors may be 17 | used to endorse or promote products derived from this software without 18 | specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 21 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 22 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 24 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 27 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | */ 32 | 33 | #ifndef GSHICCUPS_H 34 | #define GSHICCUPS_H 35 | 36 | #if __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | void GSDisallowSpinTrace(); 41 | void GSAllowSpinTrace(); 42 | void GSStopWatchingForHiccups(); 43 | void GSStartWatchingForHiccups(); 44 | 45 | void GSSampleSelfWithThreads(int r0, int* r1, Boolean threads); 46 | void GSSampleSelf(int r0, int* r1); ///< Calls *r1 = 0; GSSampleSelfWithThreads(r0, r1, true); 47 | 48 | // which is a capability. 49 | extern CFStringRef kGSHiccoughInterval; 50 | 51 | #if __cplusplus 52 | } 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Headers/BeInstanceOf.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | namespace Cedar { namespace Matchers { 4 | struct BeInstanceOfMessageBuilder { 5 | template 6 | static NSString * string_for_actual_value(const U & value) { 7 | id idValue = value; 8 | return [NSString stringWithFormat:@"%@ (%@)", idValue, NSStringFromClass([idValue class])]; 9 | } 10 | }; 11 | 12 | class BeInstanceOf : public Base { 13 | private: 14 | BeInstanceOf & operator=(const BeInstanceOf &); 15 | 16 | public: 17 | explicit BeInstanceOf(const Class expectedValue); 18 | ~BeInstanceOf(); 19 | // Allow default copy ctor. 20 | 21 | template 22 | bool matches(const U &) const; 23 | 24 | BeInstanceOf & or_any_subclass(); 25 | 26 | protected: 27 | virtual NSString * failure_message_end() const; 28 | 29 | private: 30 | const Class expectedClass_; 31 | bool includeSubclasses_; 32 | }; 33 | 34 | inline BeInstanceOf be_instance_of(const Class expectedValue) { 35 | return BeInstanceOf(expectedValue); 36 | } 37 | 38 | inline BeInstanceOf::BeInstanceOf(const Class expectedClass) 39 | : Base(), expectedClass_(expectedClass), includeSubclasses_(false) {} 40 | 41 | inline BeInstanceOf::~BeInstanceOf() {} 42 | 43 | inline BeInstanceOf & BeInstanceOf::or_any_subclass() { 44 | includeSubclasses_ = true; 45 | return *this; 46 | } 47 | 48 | inline /*virtual*/ NSString * BeInstanceOf::failure_message_end() const { 49 | NSMutableString *messageEnd = [NSMutableString stringWithFormat:@"be an instance of class <%@>", expectedClass_]; 50 | if (includeSubclasses_) { 51 | [messageEnd appendString:@", or any of its subclasses"]; 52 | } 53 | return messageEnd; 54 | } 55 | 56 | #pragma mark Generic 57 | template 58 | bool BeInstanceOf::matches(const U & actualValue) const { 59 | if (includeSubclasses_) { 60 | return [actualValue isKindOfClass:expectedClass_]; 61 | } else { 62 | return [actualValue isMemberOfClass:expectedClass_]; 63 | } 64 | } 65 | }} 66 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/BeInstanceOf.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | namespace Cedar { namespace Matchers { 4 | struct BeInstanceOfMessageBuilder { 5 | template 6 | static NSString * string_for_actual_value(const U & value) { 7 | id idValue = value; 8 | return [NSString stringWithFormat:@"%@ (%@)", idValue, NSStringFromClass([idValue class])]; 9 | } 10 | }; 11 | 12 | class BeInstanceOf : public Base { 13 | private: 14 | BeInstanceOf & operator=(const BeInstanceOf &); 15 | 16 | public: 17 | explicit BeInstanceOf(const Class expectedValue); 18 | ~BeInstanceOf(); 19 | // Allow default copy ctor. 20 | 21 | template 22 | bool matches(const U &) const; 23 | 24 | BeInstanceOf & or_any_subclass(); 25 | 26 | protected: 27 | virtual NSString * failure_message_end() const; 28 | 29 | private: 30 | const Class expectedClass_; 31 | bool includeSubclasses_; 32 | }; 33 | 34 | inline BeInstanceOf be_instance_of(const Class expectedValue) { 35 | return BeInstanceOf(expectedValue); 36 | } 37 | 38 | inline BeInstanceOf::BeInstanceOf(const Class expectedClass) 39 | : Base(), expectedClass_(expectedClass), includeSubclasses_(false) {} 40 | 41 | inline BeInstanceOf::~BeInstanceOf() {} 42 | 43 | inline BeInstanceOf & BeInstanceOf::or_any_subclass() { 44 | includeSubclasses_ = true; 45 | return *this; 46 | } 47 | 48 | inline /*virtual*/ NSString * BeInstanceOf::failure_message_end() const { 49 | NSMutableString *messageEnd = [NSMutableString stringWithFormat:@"be an instance of class <%@>", expectedClass_]; 50 | if (includeSubclasses_) { 51 | [messageEnd appendString:@", or any of its subclasses"]; 52 | } 53 | return messageEnd; 54 | } 55 | 56 | #pragma mark Generic 57 | template 58 | bool BeInstanceOf::matches(const U & actualValue) const { 59 | if (includeSubclasses_) { 60 | return [actualValue isKindOfClass:expectedClass_]; 61 | } else { 62 | return [actualValue isMemberOfClass:expectedClass_]; 63 | } 64 | } 65 | }} 66 | -------------------------------------------------------------------------------- /ios/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/BeInstanceOf.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | namespace Cedar { namespace Matchers { 4 | struct BeInstanceOfMessageBuilder { 5 | template 6 | static NSString * string_for_actual_value(const U & value) { 7 | id idValue = value; 8 | return [NSString stringWithFormat:@"%@ (%@)", idValue, NSStringFromClass([idValue class])]; 9 | } 10 | }; 11 | 12 | class BeInstanceOf : public Base { 13 | private: 14 | BeInstanceOf & operator=(const BeInstanceOf &); 15 | 16 | public: 17 | explicit BeInstanceOf(const Class expectedValue); 18 | ~BeInstanceOf(); 19 | // Allow default copy ctor. 20 | 21 | template 22 | bool matches(const U &) const; 23 | 24 | BeInstanceOf & or_any_subclass(); 25 | 26 | protected: 27 | virtual NSString * failure_message_end() const; 28 | 29 | private: 30 | const Class expectedClass_; 31 | bool includeSubclasses_; 32 | }; 33 | 34 | inline BeInstanceOf be_instance_of(const Class expectedValue) { 35 | return BeInstanceOf(expectedValue); 36 | } 37 | 38 | inline BeInstanceOf::BeInstanceOf(const Class expectedClass) 39 | : Base(), expectedClass_(expectedClass), includeSubclasses_(false) {} 40 | 41 | inline BeInstanceOf::~BeInstanceOf() {} 42 | 43 | inline BeInstanceOf & BeInstanceOf::or_any_subclass() { 44 | includeSubclasses_ = true; 45 | return *this; 46 | } 47 | 48 | inline /*virtual*/ NSString * BeInstanceOf::failure_message_end() const { 49 | NSMutableString *messageEnd = [NSMutableString stringWithFormat:@"be an instance of class <%@>", expectedClass_]; 50 | if (includeSubclasses_) { 51 | [messageEnd appendString:@", or any of its subclasses"]; 52 | } 53 | return messageEnd; 54 | } 55 | 56 | #pragma mark Generic 57 | template 58 | bool BeInstanceOf::matches(const U & actualValue) const { 59 | if (includeSubclasses_) { 60 | return [actualValue isKindOfClass:expectedClass_]; 61 | } else { 62 | return [actualValue isMemberOfClass:expectedClass_]; 63 | } 64 | } 65 | }} 66 | --------------------------------------------------------------------------------