                             if let alert = subject.presentedViewController as? UIAlertController,
                                 let action = alert.actions.first {
                                     action.handler()(action)
-                                    NSRunLoop.mainRunLoop().runUntilDate(NSDate(timeIntervalSinceNow: 2))
                             }
                         }
 
                         it("should dismiss the alert") {
+                            NSRunLoop.mainRunLoop().runUntilDate(NSDate(timeIntervalSinceNow: 1))
                             expect(subject.presentedViewController).to(beNil())
                         }
                     }

                        backgroundQueue.runNextOperation()
                        backgroundQueue.runNextOperation()
                        mainQueue.runNextOperation()
                        NSRunLoop.mainRunLoop().runUntilDate(NSDate(timeIntervalSinceNow: 1))
                    }

                    it("should present an alert") {
                        expect(subject.presentedViewController).to(beAnInstanceOf(UIAlertController.self))
                        if let alert = subject.presentedViewController as? UIAlertController {
                            expect(alert.title).to(equal("Feed Detected"))

                            if let alert = subject.presentedViewController as? UIAlertController,
                                let action = alert.actions.last {
                                    action.handler()(action)
                                    NSRunLoop.mainRunLoop().runUntilDate(NSDate(timeIntervalSinceNow: 0.5))
                            }
                        }

                        it("should dismiss the alert") {
                            NSRunLoop.mainRunLoop().runUntilDate(NSDate(timeIntervalSinceNow: 0.5))
                            expect(subject.presentedViewController).to(beNil())
                        }

