From 87dffff365ed31045ffdbca6da4d8c8da7dd4fb4 Mon Sep 17 00:00:00 2001 From: Ryan Linton Date: Wed, 14 Jan 2015 18:16:40 -0800 Subject: [PATCH] Make sure the support methods make it into all screens --- spec/unit/support_spec.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/spec/unit/support_spec.rb b/spec/unit/support_spec.rb index cf210c6..8a083d8 100644 --- a/spec/unit/support_spec.rb +++ b/spec/unit/support_spec.rb @@ -3,26 +3,41 @@ describe "PM::Support" do before do @app = TestDelegate.new @screen = BasicScreen.new + @tab_screen = TabScreen.new + @table_screen = TestTableScreen.new + @web_screen = TestWebScreen.new end it "has a convenience method for UIApplication.sharedApplication" do @app.app.should == UIApplication.sharedApplication @screen.app.should == UIApplication.sharedApplication + @tab_screen.app.should == UIApplication.sharedApplication + @table_screen.app.should == UIApplication.sharedApplication + @web_screen.app.should == UIApplication.sharedApplication end it "has a convenience method for UIApplication.sharedApplication.delegate" do @app.app_delegate.should == UIApplication.sharedApplication.delegate @screen.app_delegate.should == UIApplication.sharedApplication.delegate + @tab_screen.app_delegate.should == UIApplication.sharedApplication.delegate + @table_screen.app_delegate.should == UIApplication.sharedApplication.delegate + @web_screen.app_delegate.should == UIApplication.sharedApplication.delegate end it "has a convenience method for UIApplication.sharedApplication.delegate.window" do @app.app_window.should == UIApplication.sharedApplication.delegate.window @screen.app_window.should == UIApplication.sharedApplication.delegate.window + @tab_screen.app_window.should == UIApplication.sharedApplication.delegate.window + @table_screen.app_window.should == UIApplication.sharedApplication.delegate.window + @web_screen.app_window.should == UIApplication.sharedApplication.delegate.window end it "has a try method" do @app.try(:some_method).should == nil @screen.try(:some_method).should == nil + @tab_screen.try(:some_method).should == nil + @table_screen.try(:some_method).should == nil + @web_screen.try(:some_method).should == nil end end