Sha256: 6230c7160cc45a1afc1845037f76e1fd53f6f000c779def57fba3807777cb5a1
Contents?: true
Size: 720 Bytes
Versions: 17
Compression:
Stored size: 720 Bytes
Contents
# encoding: utf-8 class Nanoc::NotificationCenterTest < MiniTest::Unit::TestCase include Nanoc::TestHelpers 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
17 entries across 17 versions & 1 rubygems