Closed mattetti closed 12 years ago
I have no problem running spec at current HEAD.
rake spec:all
runs with following result:
rake spec:all
BubbleWrap::Ext::BuildTask
.extended
- responds to :setup_with_bubblewrap
- responds to :setup_without_bubblewrap
- replaces :setup with :setup_with_bubblewrap
.setup_with_bubblewrap
- calls the passed-in block
when app.files is nil
- sets app.files
when app.files is empty
- sets app.files
when app.files has contents
- sets app.files
- removes duplicates from app.files
- adds BW dependencies
when app.frameworks is empty
- sets the default frameworks
when app.frameworks is empty
- sets the default frameworks
when app.frameworks contains defaults
- sets the default frameworks
when app.frameworks contains non-defaults
- sets the default frameworks and the contents
when BW::Requirement.frameworks has contents
- sets the default frameworks and the contents
BubbleWrap::Ext::ConfigTask
.included
- aliases :files_dependencies to :files_dependencies_without_bubblewrap
- aliass :files_dependencies_with_bubblewrap to :files_dependencies
#path_matching_expression
- returns a regular expression
#files_dependencies_with_bubblewrap
- should call #path_matching_expression
BubbleWrap::Requirement::PathManipulation
#convert_caller_to_path
- strips off from the second-to-last colon
- leaves plain old paths unmolested
#convert_to_absolute_path
- converts relative paths to absolute paths
- doesn't modify absolute paths
#strip_up_to_last_lib
- strips off from the last lib
- doesn't modify the path otherwise
#convert_to_relative
- strips off the root portion
BubbleWrap::Requirement
.scan
- asking for a not-yet-found file raises an exception
- finds the specified file
- finds multiple files according to spec
- never depends on itself
- can depend on another file
- can use a framework
- figures out the root of the project
.frameworks
- includes UIKit by default
- includes Foundation by default
- includes CoreGraphics by default
BubbleWrap
.root
- returns an absolute path
.require
- delegates to Requirement.scan
- finds files with relative paths
- finds files with absolute paths
39 specifications (39 requirements), 0 failures, 0 errors
Build ./build/iPhoneSimulator-5.1-Development
Simulate ./build/iPhoneSimulator-5.1-Development/testSuite_spec.app
BubbleWrap
debug flag
- can be set
- can be unsetdyld: DYLD_ environment variables being ignored because main executable (/usr/bin/atos) has __RESTRICT/__restrict section
2012-07-11 15:26:42.729 testSuite[54334:c07] spec.rb:553:in `satisfy:': true.==(false) failed (Bacon::Error)
from spec.rb:567:in `method_missing:'
from spec.rb:183:in `block in run_spec_block'
from 4:in `execute_block'
from spec.rb:183:in `run_spec_block'
from spec.rb:198:in `run'
[FAILED]
RGB color
- creates color with rgb devided by 255 with alpha=1
- rgba_color uses the real alpha
Localized string
- loads the string from NSBundle
uuid
- creates always the new UUID
HTTP
Core HTTP method calls
- .get .post .put .delete .head .patch should properly generate the HTTP::Query
- uses the block instead of action passed in
HTTP::Response
- should turn the initialization Hash to instance variables
- says OK status code 20x
- updates ivars when calling update
- has appropriate attributes
HTTP::Query
- has appropriate attributes
When initialized
- should upcase the HTTP method
- should set the deleted delegator from options
- sets the files to instance variable
- should set self as the delegator if action was not passed in
- should merge :username and :password in loaded credentials
- should set default timeout to 30s or the one from hash
- should delete :headers from options and escape Line Feeds
- should delete :cache_policy or set NSURLRequestUseProtocolCachePolicy
- should set the rest of options{} to ivar @options
- should create a new response before instantiating a new request
- should call initiate_request with the URL passed in
- should pass the new request in the new connection
- should start the connection
- should turn on the network indicator
PAYLOAD / UPLOAD FILES
- should set payload from options{} to @payload
- should check if @payload is a hash before generating GET params
- should check if payload is nil
- should set the payload in URL only for GET and HEAD requests
- sets the HTTPBody DATA to @request for all methods except GET and HEAD
- sets the payload without conversion to-from NSString if the payload was NSData
create request
- should create a new request with HTTP method & header fields
- creates a new NSURLConnection and sets itself as a delegate
- should patch the NSURLRequest with done_loading and done_loading!
- should pass the right arguments when creating new request
Generating GET params
- should create params with nested hashes with prefix[key]=value
when didReceiveResponse:
- should assign status_code, headers and response_size
when didRecieveData:
- should initialize @received_data and append the received data
when requestDidFailWithError:
- should turn off network indicator
- should set request_done to true
- should set the error message to response object
- should check if there's a callback block and pass the response in
when connectionDidFinishLoading:
- should turn off the network indicator
- should set request_done to true
- should set response_body to @received data if not nil
- should check if there's a callback block and pass the response in
when connection:willSendRequest:redirectResponse:
- should make a mutableCopy of passed in request and set headers from @headers
- should create a new Connection with the request passed in
- should set itself as a delegate of new NSURLConnection
- should pass the new request in the new connection
didReceiveAuthenticationChallenge
- should cancel the authentication if the failure count was not 0
- should pass in Credentials and the challenge itself to the sender
- always uses NSURLCredentialPersistenceForSession
BubbleWrap::Reactor
slavish EventMachine compatibility
.reactor_running?
- returns true
.reactor_thread?
- returns true
.add_timer
- schedules and executes timers
- only runs the callback once
.add_periodic_timer
- runs callbacks repeatedly
.cancel_timer
- cancels timers
- cancels periodic timers
.defer
- defers the operation
- calls the callback after the operation finishes
.schedule
- defers the operation
.schedule_on_main
- defers the operation
RSSParser
initialization
- works with a string representing an url
- works with a NSURL instance
BubbleWrap::App
.documents_path
- should end in "/Documents"
.resources_path
- should end in "/testSuite.app"
.notification_center
- should be a NSNotificationCenter
.user_cache
- should be a NSUserDefaults
.alert
with only one string argument
- returns an alert
- is displaying the correct title
cancelButton
- is present
- has the correct title
with only two string arguments
- returns an alert
- is displaying the correct title
cancelButton
- is present
- has the correct title
with variable args
- returns an alert
- is displaying the correct title
- is displaying the correct message
cancelButton
- is present
- has the correct title
with a block
- returns an alert
- is displaying the correct title
- is displaying the correct message
cancelButton
- is present
- has the correct title
.states
- returns a hash
- returns the real instance variable
.name
- returns the application name
.identifier
- returns the application identifier
.frame
- returns Application Frame
.bounds
- returns Main Screen bounds
.delegate
- returns a TestSuiteDelegate
.run_after
- should run a block after the provided delay
.open_url
- uses NSURL or converts NSString in NSURL and opens it
BubbleWrap::Device::Camera
.flash?
- should be true for front cameras
- should be false for rear cameras
.picture
- should have correct error for source_type camera
under normal conditions
- should work
.imagePickerControllerDidCancel
- should yield the correct error when canceled
.imagePickerController:didFinishPickingMediaWithInfo:
- should yield the correct results
BubbleWrap::Device::CameraWrapper
on device with only front facing camera
.front?
- returns true
.rear?
- returns false
on device with only rear facing camera
.front?
- returns false
.rear?
- returns true
BubbleWrap::Device::Screen
on retina enabled screen
.retina?
- returns true
on non-retina enabled screen
.retina?
- returns false
.orientation
portrait
- returns :portrait
portrait upside down
- returns :portrait_upside_down
landscape left
- returns :landscape_left
landscape right
- returns :landscape_right
face up
- returns :face_up
face down
- returns :face_down
unknown
- returns :unknown
any other input
- returns :unknown
.width
- returns the current device screen width
.height
- returns the current device screen height
.width_for_orientation
:landscape_left
- returns the current device screen height
:landscape_right
- returns the current device screen height
default
- returns the current device screen width
.height_for_orientation
:landscape_left
- returns the current device screen width
:landscape_right
- returns the current device screen width
default
- returns the current device screen height
BubbleWrap::Device
on iPhone
.iphone?
- returns true
.ipad?
- returns false
on iPad
.iphone?
- returns false
.ipad?
- returns true
.simulator?
- returns true
.screen
- return BubbleWrap::Screen
.retina?
- delegates to BubbleWrap::Screen.retina?
.orientation
- delegates to BubbleWrap::Screen.orientation
UIView
- returns a gesture recognizer
- enables interaction when called
- doesn't enable interaction if asked not to
- returns a gesture recognizer
- enables interaction when called
- doesn't enable interaction if asked not to
- returns a gesture recognizer
- enables interaction when called
- doesn't enable interaction if asked not to
- returns a gesture recognizer
- enables interaction when called
- doesn't enable interaction if asked not to
- returns a gesture recognizer
- enables interaction when called
- doesn't enable interaction if asked not to
- returns a gesture recognizer
- enables interaction when called
- doesn't enable interaction if asked not to
#whenTapped
#whenPinched
#whenRotated
#whenSwiped
#whenPanned
#whenPressed
JSON
parsing a basic JSON string without block
- should convert a top object into a Ruby hash
- should properly convert integers values
- should properly convert string values
- should convert an array into a Ruby array
parsing a basic JSON string with block
- should convert a top object into a Ruby hash
- should properly convert integers values
- should properly convert string values
- should convert an array into a Ruby array
generating a JSON string from an object
- should generate from a hash
- should encode and decode and object losslessly
KVOHelper
Callbacks
- should add an observer block
- should not add an observer block if the key path is not present
- should not add an observer block if the block is not present
- should remove an observer block
- should not remove an observer block if the target is not present
- should not remove an observer block if the key path is not present
- should remove only one observer block
- should remove all observer blocks
API
- should observe a key path
- should observe a key path with more than one block
- should unobserve a key path
NSIndexPathWrap
- should be able to use an array like accessor
- should support the each iterator
NSNotificationCenter
- return notification center
- add observer
- remove observer
BubbleWrap::Persistence
.app_key
- caches the @app_key
- delegates to BubbleWrap::App.idenfitier
storing objects
- can persist simple objects
- must call synchronize
storing multiple objects
- can persist multiple objects
- must call synchronize
retrieving objects
- can retrieve persisted objects
BubbleWrap::String
String
- should include BubbleWrap::String
CamelCase input
.camelize(true)
- doesn't change the value
.camelize(false)
- lower cases the first character
.underscore
- converts it to underscores
camelCase input
.camelize(true)
- upper cases the first character
.camelize(false)
- doesn't change the value
.underscore
- converts it to underscores
snake_case input
.camelize(true)
- converts to CamelCase
.camelize(false)
- converts to camelCase
.underscore
- doesn't change the value
A UIColor should be created from a String with a hex color
- with 6 digits
- with 3 digits
- with no # sign
a string with a color keyword (blue, red, lightText)
- should return the corresponding color
- should accept camelCase
- should accept snake_case
A UIColor should not be created from an invalid String wuth
- an invalid hex colordyld: DYLD_ environment variables being ignored because main executable (/usr/bin/atos) has __RESTRICT/__restrict section
2012-07-11 15:26:48.269 testSuite[54334:c07] string.rb:54:in `to_color': ArgumentError (ArgumentError)
from spec.rb:471:in `raise?:'
from spec.rb:449:in `raise?:'
from spec.rb:567:in `block in method_missing:'
from spec.rb:545:in `satisfy:'
from spec.rb:567:in `method_missing:'
from spec.rb:183:in `block in run_spec_block'
from 4:in `execute_block'
from spec.rb:183:in `run_spec_block'
from spec.rb:198:in `run'
hmm thanks, looks like I can't compile any RM apps anymore :( I might have messed up something using iOS 6. Thanks for checking on the test suite.
rebooted my machine and the test suite runs again.
@mattetti thanks for the hint, i have the same problem
It is not unusual for Xcode development ;)
Still fails on my machine :(
Try rebooting and reseting xcode-select -switch to the non beta xcode and check the xcode-select path.
On Wed, Jul 11, 2012 at 10:44 AM, Marin Usalj < reply@reply.github.com
wrote:
Still fails on my machine :(
Reply to this email directly or view it on GitHub: https://github.com/rubymotion/BubbleWrap/issues/95#issuecomment-6913989
everything seems fine :/
~> xcode-select -print-path
/Applications/Xcode.app/Contents/Developer
closing this issue, it seems like yet another RubyMotion bug
i'm trying to run the test suite on iOS 5.1 with RubyMotion 1.15 and here is what I'm getting:
Terminating since there is no system event server. (Run the EventPump or pass the argument "-RegisterForSystemEvents" if you want to run without SpringBoard.
Can someone confirm the problem and does anyone have a clue what's going on and why SpringBoard doesn't start? (looks like our delegate isn't used anymore)