added tests, organized lib
[god.git] / test / test_meddle.rb
blob570850f07b15eaa7910858922965aded0fc581a2
1 require 'test_helper'
3 class TestMeddle < Test::Unit::TestCase
4   def setup
5     @meddle = Meddle.new
6   end
7   
8   def test_should_initialize_watches_to_empty_array
9     assert_equal [], @meddle.watches
10   end
11   
12   def test_watches_should_get_stored
13     watch = nil
14     @meddle.watch { |w| watch = w }
15     
16     assert_equal 1, @meddle.watches.size
17     assert_equal watch, @meddle.watches.first
18   end
19 end