Merge branch 'version-0.7'

This commit is contained in:
Jamon Holmgren
2013-06-04 12:39:30 -07:00
4 changed files with 19 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
PATH
remote: .
specs:
ProMotion (0.7.0)
ProMotion (0.7.2)
GEM
remote: https://rubygems.org/

View File

@@ -1,4 +1,7 @@
module ProMotion
class NavigationController < UINavigationController
def shouldAutorotate
visibleViewController.shouldAutorotate
end
end
end
end

View File

@@ -1,3 +1,3 @@
module ProMotion
VERSION = "0.7.1" unless defined?(ProMotion::VERSION)
VERSION = "0.7.2" unless defined?(ProMotion::VERSION)
end

View File

@@ -43,6 +43,19 @@ describe "screen properties" do
@screen.should_autorotate.should == true
end
# Issue https://github.com/clearsightstudio/ProMotion/issues/109
it "#should_autorotate should fire when shouldAutorotate fires when in a navigation bar" do
parent_screen = BasicScreen.new(nav_bar: true)
parent_screen.open @screen
@screen.mock!(:should_autorotate) { true.should == true }
parent_screen.navigationController.shouldAutorotate
end
# <= iOS 5 only
it "#should_rotate(orientation) should fire when shouldAutorotateToInterfaceOrientation(orientation) fires" do
@screen.mock!(:should_rotate) { |orientation| orientation.should == UIInterfaceOrientationMaskPortrait }
@screen.shouldAutorotateToInterfaceOrientation(UIInterfaceOrientationMaskPortrait)
end
describe "iOS lifecycle methods" do