spec/motion/media/player_spec.rb in bubble-wrap-1.1.3 vs spec/motion/media/player_spec.rb in bubble-wrap-1.1.4
- old
+ new
@@ -34,11 +34,11 @@
@player = BW::Media::Player.new
@local_file = NSURL.fileURLWithPath(File.join(App.resources_path, 'test.mp3'))
end
it "should present a modalViewController on root if no controller given" do
- @controller = UIApplication.sharedApplication.keyWindow.rootViewController
+ @controller = App.window.rootViewController
@player.play_modal(@local_file)
wait 1 do
@controller.modalViewController.should.not == nil
@@ -56,10 +56,10 @@
@controller = UIViewController.alloc.initWithNibName(nil, bundle:nil)
# .presentMoviePlayerViewControllerAnimated detects whether or not
# @controller.view is part of a hierarchy, I guess. if you remove this
# then the test fails.
- UIApplication.sharedApplication.keyWindow.rootViewController.view.addSubview(@controller.view)
+ App.window.rootViewController.view.addSubview(@controller.view)
@player.play_modal(@local_file, controller: @controller)
wait 1 do
@controller.modalViewController.should.not == nil
\ No newline at end of file