Sha256: 09ed31697278dc5cef6a3cda504cb38aaae6961dc38cee8b376c6f4e16b71c98
Contents?: true
Size: 365 Bytes
Versions: 7
Compression:
Stored size: 365 Bytes
Contents
require 'spec_helper' RSpec.describe 'Kernel#alert' do it 'returns nil' do begin original_alert = `window.alert` message = nil `window.alert = function(string) { message = string; }` Kernel.alert('a message').should be_nil expect(message).to eq('a message') ensure `window.alert = #{original_alert}` end end end
Version data entries
7 entries across 7 versions & 1 rubygems