mirror of
https://github.com/zhigang1992/ProMotion.git
synced 2026-06-02 06:49:45 +08:00
Fixing specs to work in RM 2.0
https://github.com/clearsightstudio/ProMotion/blob/version-0.6/lib/ProMo tion/screen_helpers/split_screen.rb#L9
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
class TestDelegate < ProMotion::Delegate
|
||||
def on_load(app, options)
|
||||
end
|
||||
|
||||
# Hack to make RM 2.0 work.
|
||||
# Ref: http://hipbyte.myjetbrains.com/youtrack/issue/RM-136
|
||||
def dealloc
|
||||
end
|
||||
end
|
||||
|
||||
@@ -10,6 +10,10 @@ describe "split screen in tab bar functionality" do
|
||||
@tab = @app.open_tab_bar @split_screen, HomeScreen, BasicScreen
|
||||
end
|
||||
|
||||
after do
|
||||
@split_screen.delegate = nil # dereference to avoid memory issue
|
||||
end
|
||||
|
||||
it "should create a UISplitViewController" do
|
||||
@split_screen.is_a?(UISplitViewController).should == true
|
||||
end
|
||||
@@ -46,4 +50,4 @@ describe "split screen in tab bar functionality" do
|
||||
@tab.viewControllers.first.should == @split_screen
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -10,6 +10,10 @@ describe "split screen `open` functionality" do
|
||||
@split_screen = @app.open_split_screen @master_screen, @detail_screen_1
|
||||
end
|
||||
|
||||
after do
|
||||
@split_screen.delegate = nil # dereference to avoid memory issue
|
||||
end
|
||||
|
||||
it "should open a new screen in the detail view" do
|
||||
@master_screen.open @detail_screen_2, in_detail: true
|
||||
@split_screen.detail_screen.should == @detail_screen_2
|
||||
@@ -43,4 +47,4 @@ describe "split screen `open` functionality" do
|
||||
home.navigation_controller.topViewController.should == child
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,6 +9,10 @@ describe "split screen functionality" do
|
||||
@split_screen = @app.open_split_screen @master_screen, @detail_screen
|
||||
end
|
||||
|
||||
after do
|
||||
@split_screen.delegate = nil # dereference to avoid memory issue
|
||||
end
|
||||
|
||||
it "should have created a split screen" do
|
||||
@split_screen.should != nil
|
||||
@split_screen.is_a?(UISplitViewController).should == true
|
||||
@@ -32,4 +36,4 @@ describe "split screen functionality" do
|
||||
@split_screen.viewControllers.last.should == @detail_screen.main_controller
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user