mirror of
https://github.com/zhigang1992/ProMotion.git
synced 2026-05-31 18:01:33 +08:00
Write some specs
This commit is contained in:
25
spec/unit/support_spec.rb
Normal file
25
spec/unit/support_spec.rb
Normal 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user