Skip to content

Instantly share code, notes, and snippets.

@chrislerum
Created September 14, 2012 14:37
Show Gist options
  • Save chrislerum/3722288 to your computer and use it in GitHub Desktop.
Save chrislerum/3722288 to your computer and use it in GitHub Desktop.
rake spec teacup
==[~/code/rubymotion_apps]
git clone https://github.com/rubymotion/teacup.git
Cloning into 'teacup'...
remote: Counting objects: 1911, done.
remote: Compressing objects: 100% (814/814), done.
remote: Total 1911 (delta 1003), reused 1888 (delta 984)
Receiving objects: 100% (1911/1911), 283.82 KiB, done.
Resolving deltas: 100% (1003/1003), done.
==[~/code/rubymotion_apps]
cd teacup
==[~/code/rubymotion_apps/teacup] [master]
tig
==[~/code/rubymotion_apps/teacup] [master]
bundle
Using rake (0.9.2.2)
Using diff-lcs (1.1.3)
Using rspec-core (2.10.1)
Using rspec-expectations (2.10.0)
Using rspec-mocks (2.10.1)
Using rspec (2.10.0)
Using teacup (0.3.12) from source at .
Using bundler (1.2.0)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
==[~/code/rubymotion_apps/teacup] [master ⚡]
rake spec
Build ./build/iPhoneSimulator-6.0-Development
Compile /Users/chris/code/rubymotion_apps/teacup/lib/teacup/handler.rb
Compile /Users/chris/code/rubymotion_apps/teacup/lib/teacup/layout.rb
Compile /Users/chris/code/rubymotion_apps/teacup/lib/teacup/restyle.rb
Compile /Users/chris/code/rubymotion_apps/teacup/lib/teacup/stylesheet.rb
Compile /Users/chris/code/rubymotion_apps/teacup/lib/teacup/merge_defaults.rb
Compile /Users/chris/code/rubymotion_apps/teacup/lib/teacup/style.rb
Compile /Users/chris/code/rubymotion_apps/teacup/lib/teacup/version.rb
Compile /Users/chris/code/rubymotion_apps/teacup/lib/teacup/z_core_extensions/ui_view.rb
Compile /Users/chris/code/rubymotion_apps/teacup/lib/teacup/stylesheet_extensions/rotation.rb
Compile /Users/chris/code/rubymotion_apps/teacup/lib/teacup/z_core_extensions/ui_view_getters.rb
Compile /Users/chris/code/rubymotion_apps/teacup/lib/teacup/z_core_extensions/ca_layer.rb
Compile /Users/chris/code/rubymotion_apps/teacup/lib/teacup/z_core_extensions/ui_view_controller.rb
Compile /Users/chris/code/rubymotion_apps/teacup/lib/dummy.rb
Compile /Users/chris/code/rubymotion_apps/teacup/lib/teacup/z_core_extensions/z_handlers.rb
Compile ./app/controllers/first_controller.rb
Compile ./app/app_delegate.rb
Compile ./app/controllers/tableview_controller.rb
Compile ./app/views/custom_view.rb
Compile ./app/controllers/landscape_only_controller.rb
Compile ./app/styles/main_styles.rb
Compile /Library/RubyMotion/lib/motion/spec.rb
Compile /Library/RubyMotion/lib/motion/spec/helpers/ui.rb
Compile ./spec/main_spec.rb
Compile ./spec/style_spec.rb
Compile ./spec/stylesheet_spec.rb
Compile ./spec/view_spec.rb
Create ./build/iPhoneSimulator-6.0-Development/teacup_spec.app
Link ./build/iPhoneSimulator-6.0-Development/teacup_spec.app/teacup
Create ./build/iPhoneSimulator-6.0-Development/teacup_spec.app/Info.plist
Create ./build/iPhoneSimulator-6.0-Development/teacup_spec.app/PkgInfo
Create ./build/iPhoneSimulator-6.0-Development/teacup_spec.dSYM
Simulate ./build/iPhoneSimulator-6.0-Development/teacup_spec.app
Application 'Teacup'
- has one window
- should have a root view
view controller
- should be able to rotate
root view
- root view should be styled as 'root'
background view
- should be styled as :background
- background view should have subviews
- should not have styles overridden by base classes
- should have styles overridden orientation styles
background subviews
- should have all UILabels with color blue
welcome
- should be styled as :welcome
footer
- should be styled as :footer
button
- should be styled as :next_message
background view in landscape
- should be in landscape [FAILED]
- should be styled as :background - landscape [FAILED]
- should not have styles overridden by base classes [FAILED]
- should have styles overridden orientation styles [FAILED]
background subviews in landscape
welcome
- should be styled as :welcome - landscape [FAILED]
footer
- should be styled as :footer - landscape [FAILED]
button
- should be styled as :next_message - landscape [FAILED]
Stylesheet 'first'
- should exist
- should define some styles
- should union the next_message styles
Teacup::Style
- should be equal to a Hash
- should act like a Hash
- should use orientation to override
- should look in extends
- should look in import
- should merge :extends properties
- should merge hashes
- should merge multiple extends
- should merge and flatten orientation rules
- should respect precedence rules
- should respect merge based on class inheritance
Teacup::Stylesheet
creation
- should create constants for named stylesheets
- should allow creating anonymous stylesheets
in the simplest cases
- should let you define properties for a stylename
- should let you define properties for many stylenames
- should return {} for unknown stylenames
with multiple rules for the same stylename
- should union different properties
- should give later properties precedence
- should give merge hashes
when a stylename extends another
- should put extended properties into an "extends" Array of Hashes
- should give the "lowest" style properties precedence
- should follow a chain of extends
importing another stylesheet
- should work with a name
- should work with a name even if defined out of order
- should work with a value
- should not explode if a cycle is created
- should explode if an unknown stylesheet is imported
querying imported stylesheets
- should union different properties for the same rule
- should give the importer precedence2012-09-14 10:33:48.940 teacup[85980:c07] WARNING: A stylesheet with the name :most_generic has already been created.
2012-09-14 10:33:48.943 teacup[85980:c07] WARNING: A stylesheet with the name :stylesheet has already been created.
2012-09-14 10:33:48.944 teacup[85980:c07] WARNING: A stylesheet with the name :most_specific has already been created.
- should follow chains of imports2012-09-14 10:33:48.946 teacup[85980:c07] WARNING: A stylesheet with the name :most_generic has already been created.
2012-09-14 10:33:48.947 teacup[85980:c07] WARNING: A stylesheet with the name :stylesheet has already been created.
2012-09-14 10:33:48.949 teacup[85980:c07] WARNING: A stylesheet with the name :most_specific has already been created.
- should allow querying a rule which exists only in the importee2012-09-14 10:33:48.952 teacup[85980:c07] WARNING: A stylesheet with the name :most_generic has already been created.
2012-09-14 10:33:48.953 teacup[85980:c07] WARNING: A stylesheet with the name :stylesheet has already been created.
2012-09-14 10:33:48.954 teacup[85980:c07] WARNING: A stylesheet with the name :most_specific has already been created.
precedence tree flattening
- should give precedence to later imports
- should give precedence to less-nested imports
- should extend multiple entries, and prefer the first
- should give precedence to imported rules over extended rules
- should import rules using a deep merge strategy
Teacup::View
stylename=
- should work
- should set the style when a stylesheet is there
stylesheet=
- should work
- should set the style when a stylename is there
- should push the stylesheet down to all subviews
import
- should always prefer more local styles
style
- should assign any random property that works
- should convert left/top/width/height into frame
- should assign any random property that works on the layer
- should warn about unknown thingies2012-09-14 10:33:48.998 teacup[85980:c07] Teacup WARN: Can't apply "setPartyTime:" or :partyTime= to #<UILabel:0x8b002f0>
2012-09-14 10:33:48.999 teacup[85980:c07] Teacup WARN: Can't apply "setPartyTime:" or :partyTime= to #<UILabel:0x8b002f0>
[MISSING]
Bacon::Error: 0.>(0) failed
spec.rb:553:in `satisfy:': background view in landscape - should be in landscape
spec.rb:567:in `method_missing:'
spec.rb:183:in `block in run_spec_block'
4:in `execute_block'
spec.rb:183:in `run_spec_block'
spec.rb:198:in `run'
Bacon::Error: 300.0.==(460) failed
spec.rb:553:in `satisfy:': background view in landscape - should be styled as :background - landscape
spec.rb:567:in `method_missing:'
spec.rb:183:in `block in run_spec_block'
4:in `execute_block'
spec.rb:183:in `run_spec_block'
spec.rb:198:in `run'
Bacon::Error: 0.5.==(0.799999952316284) failed
spec.rb:553:in `satisfy:': background view in landscape - should not have styles overridden by base classes
spec.rb:567:in `method_missing:'
spec.rb:183:in `block in run_spec_block'
4:in `execute_block'
spec.rb:183:in `run_spec_block'
spec.rb:198:in `run'
Bacon::Error: #<UICachedDeviceWhiteColor:0x8bcded0>.==(#<UICachedDeviceWhiteColor:0x8bce020>) failed
spec.rb:553:in `satisfy:': background view in landscape - should have styles overridden orientation styles
spec.rb:567:in `method_missing:'
spec.rb:183:in `block in run_spec_block'
4:in `execute_block'
spec.rb:183:in `run_spec_block'
spec.rb:198:in `run'
Bacon::Error: 10.0.==(90) failed
spec.rb:553:in `satisfy:': welcome - should be styled as :welcome - landscape
spec.rb:567:in `method_missing:'
spec.rb:183:in `block in run_spec_block'
4:in `execute_block'
spec.rb:183:in `run_spec_block'
spec.rb:198:in `run'
Bacon::Error: 10.0.==(90) failed
spec.rb:553:in `satisfy:': footer - should be styled as :footer - landscape
spec.rb:567:in `method_missing:'
spec.rb:183:in `block in run_spec_block'
4:in `execute_block'
spec.rb:183:in `run_spec_block'
spec.rb:198:in `run'
Bacon::Error: 150.0.==(20) failed
spec.rb:553:in `satisfy:': button - should be styled as :next_message - landscape
spec.rb:567:in `method_missing:'
spec.rb:183:in `block in run_spec_block'
4:in `execute_block'
spec.rb:183:in `run_spec_block'
spec.rb:198:in `run'
Bacon::Error: empty specification: style should warn about unknown thingies
spec.rb:287:in `block in finish_spec': style - should warn about unknown thingies
4:in `execute_block'
spec.rb:287:in `finish_spec'
spec.rb:185:in `run_spec_block'
spec.rb:198:in `run'
68 specifications (141 requirements), 7 failures, 0 errors
*** simulator session ended with error: Error Domain=DTiPhoneSimulatorErrorDomain Code=1 "The simulated application quit." UserInfo=0x100173b10 {NSLocalizedDescription=The simulated application quit., DTiPhoneSimulatorUnderlyingErrorCodeKey=-1}
rake aborted!
Command failed with status (1): [DYLD_FRAMEWORK_PATH="/Applications/Xcode45...]
Tasks: TOP => simulator
(See full trace by running task with --trace)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment