Write some specs

This commit is contained in:
Ryan Linton
2015-01-14 15:52:34 -08:00
parent 02cb6a4eb4
commit 2668594ce7

25
spec/unit/support_spec.rb Normal file
View File

@@ -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