spec/style_spec.rb in teacup-0.3.10 vs spec/style_spec.rb in teacup-0.3.11
- old
+ new
@@ -21,10 +21,14 @@
}
style[:upside_down] = {
name: :upside_down_name,
}
# no orientation, which ends up being portrait anyway.
- style.build()[:name].should == :portrait_name
+ if UIApplication.sharedApplication.statusBarOrientation == UIInterfaceOrientationPortrait
+ style.build()[:name].should == :portrait_name
+ else
+ style.build()[:name].should == :landscape_name
+ end
# landscape
style.build(nil, UIInterfaceOrientationLandscapeLeft)[:name].should == :landscape_name
# upside down
style.build(nil, UIInterfaceOrientationPortraitUpsideDown)[:name].should == :upside_down_name