From 2668594ce7a2ca006a35105d2bfaca9b5ce4bbf0 Mon Sep 17 00:00:00 2001 From: Ryan Linton Date: Wed, 14 Jan 2015 15:52:34 -0800 Subject: [PATCH] Write some specs --- spec/unit/support_spec.rb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 spec/unit/support_spec.rb diff --git a/spec/unit/support_spec.rb b/spec/unit/support_spec.rb new file mode 100644 index 0000000..cc4a8d7 --- /dev/null +++ b/spec/unit/support_spec.rb @@ -0,0 +1,25 @@ +describe "PM::Support" do + + before do + @app = TestDelegate.new + @screen = BasicScreen.new + end + + it "has a convenience method for UIApplication.sharedApplication" do + @app.app.should == UIApplication.sharedApplication + @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 + 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 + end + +end + +