google_calendar_spec.rb 322 B

123456789101112
  1. require 'rails_helper'
  2. describe GoogleCalendar do
  3. it '#open does not mask exception in initlize' do
  4. stub(Google::Apis::CalendarV3::CalendarService).new do
  5. raise "test exception"
  6. end
  7. expect {
  8. GoogleCalendar.open({'google' => {}}, Rails.logger) {}
  9. }.to raise_error(/test exception/)
  10. end
  11. end