Sha256: adb30951c82fb356015c8ebab03c2fbe6340da39e34ef945a0d29b14d8ae7faa
Contents?: true
Size: 681 Bytes
Versions: 15
Compression:
Stored size: 681 Bytes
Contents
# encoding: utf-8 class Nanoc::NotificationCenterTest < Nanoc::TestCase def test_post # Set up notification Nanoc::NotificationCenter.on :ping_received, :test do @ping_received = true end # Post @ping_received = false Nanoc::NotificationCenter.post :ping_received assert(@ping_received) end def test_remove # Set up notification Nanoc::NotificationCenter.on :ping_received, :test do @ping_received = true end # Remove observer Nanoc::NotificationCenter.remove :ping_received, :test # Post @ping_received = false Nanoc::NotificationCenter.post :ping_received assert(!@ping_received) end end
Version data entries
15 entries across 15 versions & 1 rubygems