fixed rspec error, add stub_alert and stub_confirm rspec support methods.