apotomo 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +7 -3
  3. data/.travis.yml +6 -8
  4. data/CHANGES.textile +9 -5
  5. data/README.md +211 -0
  6. data/apotomo.gemspec +4 -4
  7. data/config/routes.rb +1 -1
  8. data/gemfiles/Gemfile.rails3-0 +6 -0
  9. data/gemfiles/Gemfile.rails3-1 +6 -0
  10. data/gemfiles/Gemfile.rails3-2 +6 -0
  11. data/gemfiles/Gemfile.rails4-0 +6 -0
  12. data/lib/apotomo/javascript_generator.rb +3 -3
  13. data/lib/apotomo/test_case.rb +14 -8
  14. data/lib/apotomo/version.rb +1 -1
  15. data/lib/apotomo/widget/javascript_methods.rb +3 -3
  16. data/lib/apotomo/widget/tree_node.rb +1 -1
  17. data/lib/apotomo/widget.rb +3 -3
  18. data/lib/generators/apotomo/widget_generator.rb +1 -1
  19. data/lib/generators/templates/view.slim +3 -4
  20. data/test/apotomo_test.rb +25 -14
  21. data/test/dummy/config/routes.rb +2 -57
  22. data/test/event_handler_test.rb +30 -60
  23. data/test/event_methods_test.rb +62 -62
  24. data/test/event_test.rb +11 -11
  25. data/test/invoke_event_handler_test.rb +59 -0
  26. data/test/javascript_generator_test.rb +57 -72
  27. data/test/rails/caching_test.rb +11 -11
  28. data/test/rails/controller_methods_test.rb +63 -57
  29. data/test/rails/rails_integration_test.rb +47 -47
  30. data/test/rails/view_helper_test.rb +31 -26
  31. data/test/rails/widget_generator_test.rb +16 -16
  32. data/test/render_test.rb +50 -50
  33. data/test/request_processor_test.rb +74 -74
  34. data/test/test_case_test.rb +45 -45
  35. data/test/test_helper.rb +14 -10
  36. data/test/tree_node_test.rb +5 -10
  37. data/test/widget_shortcuts_test.rb +25 -25
  38. data/test/widget_test.rb +82 -80
  39. metadata +73 -49
  40. data/README.rdoc +0 -205
  41. data/TODO +0 -36
  42. data/lib/apotomo/proc_event_handler.rb +0 -18
  43. data/test/onfire_integration_test.rb +0 -22
data/test/render_test.rb CHANGED
@@ -1,36 +1,36 @@
1
1
  require 'test_helper'
2
2
 
3
- class RenderTest < ActionView::TestCase
3
+ class RenderTest < MiniTest::Spec
4
4
  include Apotomo::TestCaseMethods::TestController
5
-
6
- context "#render" do
7
- setup do
5
+
6
+ describe "#render" do
7
+ before do
8
8
  @mum = mouse('mum')
9
9
  end
10
-
11
- should "per default display the state content framed in a div" do
10
+
11
+ it "per default display the state content framed in a div" do
12
12
  assert_equal '<div id="mum">burp!</div>', @mum.invoke(:eating)
13
13
  end
14
-
15
- context "with :text" do
16
- setup do
14
+
15
+ describe "with :text" do
16
+ before do
17
17
  @mum.instance_eval { def eating; render :text => "burp!!!"; end }
18
18
  end
19
-
20
- should "render the :text" do
19
+
20
+ it "render the :text" do
21
21
  assert_equal "burp!!!", @mum.invoke(:eating)
22
22
  end
23
23
  end
24
-
25
- should "accept :state and options" do
24
+
25
+ it "accept :state and options" do
26
26
  @mum.instance_eval { def eat(what); render :text => "#{what} today?"; end }
27
-
27
+
28
28
  assert_equal "Rice today?", @mum.render({:state => :eat}, "Rice")
29
29
  assert_match "Rice today?", @mum.update({:state => :eat}, "Rice")
30
30
  assert_match "Rice today?", @mum.replace({:state => :eat}, "Rice")
31
31
  end
32
-
33
- should "expose its instance variables in the rendered view" do
32
+
33
+ it "expose its instance variables in the rendered view" do
34
34
  @mum = mouse('mum') do
35
35
  def educate
36
36
  @who = "the cat"
@@ -40,95 +40,95 @@ class RenderTest < ActionView::TestCase
40
40
  end
41
41
  assert_equal 'If you see the cat do run away!', @mum.invoke(:educate)
42
42
  end
43
-
44
- context "with #render" do
45
- context "and :text" do
46
- setup do
43
+
44
+ describe "with #render" do
45
+ describe "and :text" do
46
+ before do
47
47
  @mum.instance_eval do
48
48
  def squeak
49
49
  render :text => "squeak();"
50
50
  end
51
51
  end
52
52
  end
53
-
54
- should "just return the plain :text" do
53
+
54
+ it "just return the plain :text" do
55
55
  assert_equal 'squeak();', @mum.invoke(:squeak)
56
56
  end
57
57
  end
58
-
59
- context "and no options" do
60
- setup do
58
+
59
+ describe "and no options" do
60
+ before do
61
61
  @mum.instance_eval do
62
62
  def squeak
63
63
  render
64
64
  end
65
65
  end
66
66
  end
67
-
68
- should "render the view" do
67
+
68
+ it "render the view" do
69
69
  assert_equal "<div id=\"mum\">burp!</div>", @mum.invoke(:eating)
70
70
  end
71
71
  end
72
-
73
- context "and :view" do
74
- setup do
72
+
73
+ describe "and :view" do
74
+ before do
75
75
  @mum.instance_eval do
76
76
  def squeak
77
77
  render :view => :eating
78
78
  end
79
79
  end
80
80
  end
81
-
82
- should "render the :view" do
81
+
82
+ it "render the :view" do
83
83
  assert_equal "<div id=\"mum\">burp!</div>", @mum.invoke(:squeak)
84
84
  end
85
85
  end
86
86
  end
87
-
88
- context "#update" do
89
- should "wrap the :text in an update statement" do
87
+
88
+ describe "#update" do
89
+ it "wrap the :text in an update statement" do
90
90
  @mum.instance_eval do
91
91
  def squeak
92
92
  update :text => "squeak!"
93
93
  end
94
94
  end
95
- assert_equal "$(\"#mum\").html(\"squeak!\");", @mum.invoke(:squeak)
95
+ assert_equal "jQuery(\"#mum\").html(\"squeak!\");", @mum.invoke(:squeak)
96
96
  end
97
-
98
- should "accept a selector" do
97
+
98
+ it "accept a selector" do
99
99
  @mum.instance_eval do
100
100
  def squeak
101
101
  update "div#mouse", :text => '<div id="mum">squeak!</div>'
102
102
  end
103
103
  end
104
- assert_equal "$(\"div#mouse\").html(\"<div id=\\\"mum\\\">squeak!<\\/div>\");", @mum.invoke(:squeak)
104
+ assert_equal "jQuery(\"div#mouse\").html(\"<div id=\\\"mum\\\">squeak!<\\/div>\");", @mum.invoke(:squeak)
105
105
  end
106
106
  end
107
-
108
- context "#replace" do
109
- should "wrap the :text in a replace statement" do
107
+
108
+ describe "#replace" do
109
+ it "wrap the :text in a replace statement" do
110
110
  @mum.instance_eval do
111
111
  def squeak
112
112
  replace :text => '<div id="mum">squeak!</div>'
113
113
  end
114
114
  end
115
- assert_equal "$(\"#mum\").replaceWith(\"<div id=\\\"mum\\\">squeak!<\\/div>\");", @mum.invoke(:squeak)
115
+ assert_equal "jQuery(\"#mum\").replaceWith(\"<div id=\\\"mum\\\">squeak!<\\/div>\");", @mum.invoke(:squeak)
116
116
  end
117
-
118
- should "accept a selector" do
117
+
118
+ it "accept a selector" do
119
119
  @mum.instance_eval do
120
120
  def squeak
121
121
  replace "div#mouse", :text => '<div id="mum">squeak!</div>'
122
122
  end
123
123
  end
124
- assert_equal "$(\"div#mouse\").replaceWith(\"<div id=\\\"mum\\\">squeak!<\\/div>\");", @mum.invoke(:squeak)
124
+ assert_equal "jQuery(\"div#mouse\").replaceWith(\"<div id=\\\"mum\\\">squeak!<\\/div>\");", @mum.invoke(:squeak)
125
125
  end
126
126
  end
127
-
128
- context "#escape_js" do
129
- should "escape the string" do
127
+
128
+ describe "#escape_js" do
129
+ it "escape the string" do
130
130
  assert_equal "<div id=\\\"mum\\\">squeak!<\\/div>", @mum.escape_js('<div id="mum">squeak!</div>')
131
131
  end
132
132
  end
133
- end
133
+ end
134
134
  end
@@ -1,131 +1,131 @@
1
1
  require 'test_helper'
2
2
 
3
- class RequestProcessorTest < ActiveSupport::TestCase
3
+ class RequestProcessorTest < MiniTest::Spec
4
4
  include Apotomo::TestCaseMethods::TestController
5
-
5
+
6
6
  def root_mum_and_kid!
7
7
  mum_and_kid!
8
-
8
+
9
9
  @root = Apotomo::Widget.new(parent_controller, 'root', :display)
10
10
  @root << @mum
11
11
  end
12
-
13
-
14
- context "RequestProcessor" do
15
- setup do
12
+
13
+
14
+ describe "RequestProcessor" do
15
+ before do
16
16
  @processor = Apotomo::RequestProcessor.new(parent_controller)
17
17
  root = @processor.root
18
18
  root << mouse_mock
19
19
  end
20
-
21
- should "allow external modification of the tree" do
20
+
21
+ it "allow external modification of the tree" do
22
22
  root = @processor.root
23
23
  assert_equal 2, @processor.root.size
24
24
  end
25
-
26
- should "delegate #render_widget_for to #root" do
25
+
26
+ it "delegate #render_widget_for to #root" do
27
27
  assert_equal 'squeak!', @processor.render_widget_for('mouse', :squeak)
28
28
  end
29
29
  end
30
-
31
- context "#attach_stateless_blocks_for" do
32
- setup do
30
+
31
+ describe "#attach_stateless_blocks_for" do
32
+ before do
33
33
  @processor = Apotomo::RequestProcessor.new(parent_controller)
34
34
  @root = @processor.root
35
35
  assert_equal @root.size, 1
36
36
  end
37
-
38
- should "allow has_widgets blocks with root parameter" do
37
+
38
+ it "allow has_widgets blocks with root parameter" do
39
39
  @processor.send(:attach_stateless_blocks_for, [Proc.new{ |root|
40
- root << widget(:mouse, 'mouse')
40
+ root << widget(:mouse, 'mouse')
41
41
  }], @root, parent_controller)
42
-
42
+
43
43
  assert_equal 'mouse', @processor.root['mouse'].name
44
44
  end
45
45
  end
46
-
47
- context "option processing at construction time" do
48
- context "with empty options" do
49
- setup do
46
+
47
+ describe "option processing at construction time" do
48
+ describe "with empty options" do
49
+ before do
50
50
  @processor = Apotomo::RequestProcessor.new(parent_controller)
51
51
  end
52
-
53
- should "provide a single root-node for #root" do
52
+
53
+ it "provide a single root-node for #root" do
54
54
  assert_equal 1, @processor.root.size
55
55
  end
56
56
  end
57
-
58
- context "with controller" do
59
- should "attach the passed parent_controller to root" do
57
+
58
+ describe "with controller" do
59
+ it "attach the passed parent_controller to root" do
60
60
  assert_equal parent_controller, Apotomo::RequestProcessor.new(parent_controller, {}, []).root.parent_controller
61
61
  end
62
62
  end
63
63
  end
64
-
65
-
66
- context "#process_for" do
67
- setup do
64
+
65
+
66
+ describe "#process_for" do
67
+ before do
68
68
  class KidWidget < Apotomo::Widget
69
69
  responds_to_event :doorSlam, :with => :flight
70
70
  responds_to_event :doorSlam, :with => :squeak
71
71
  def flight; render :text => "away from here!"; end
72
72
  def squeak; render :text => "squeak!"; end
73
73
  end
74
-
75
- procs = [Proc.new{ |root|
76
- root << widget(:mouse, 'mum')
74
+
75
+ procs = [Proc.new{ |root|
76
+ root << widget(:mouse, 'mum')
77
77
  KidWidget.new(root['mum'], 'kid')
78
78
  }]
79
-
79
+
80
80
  @processor = Apotomo::RequestProcessor.new(parent_controller, {:js_framework => :prototype}, procs)
81
81
  end
82
-
83
- should "return an empty array if nothing was triggered" do
82
+
83
+ it "return an empty array if nothing was triggered" do
84
84
  assert_equal [], @processor.process_for({:type => :mouseClick, :source => 'kid'})
85
85
  end
86
-
87
- should "return 2 page updates when @kid squeaks" do
86
+
87
+ it "return 2 page updates when @kid squeaks" do
88
88
  assert_equal ["away from here!", "squeak!"], @processor.process_for({:type => :doorSlam, :source => 'kid'})
89
89
  end
90
-
91
- should "append the params hash to the triggered event" do
90
+
91
+ it "append the params hash to the triggered event" do
92
92
  KidWidget.class_eval do
93
93
  def squeak(evt); render :text => evt.data.inspect; end
94
94
  end
95
-
95
+
96
96
  assert_equal ["away from here!", "{:type=>:doorSlam, :source=>\"kid\"}"], @processor.process_for({:type => :doorSlam, :source => 'kid'})
97
97
  end
98
-
99
- should "raise an exception when :source is unknown" do
98
+
99
+ it "raise an exception when :source is unknown" do
100
100
  assert_raises Apotomo::RequestProcessor::InvalidSourceWidget do
101
101
  @processor.process_for({:type => :squeak, :source => 'tom'})
102
102
  end
103
103
  end
104
104
  end
105
-
106
-
107
-
108
-
109
- context "invoking #address_for" do
110
- setup do
105
+
106
+
107
+
108
+
109
+ describe "invoking #address_for" do
110
+ before do
111
111
  @processor = Apotomo::RequestProcessor.new(parent_controller)
112
112
  end
113
-
114
- should "accept an event :type" do
113
+
114
+ it "accept an event :type" do
115
115
  assert_equal({:type => :squeak, :source => 'mum'}, @processor.address_for(:type => :squeak, :source => 'mum'))
116
116
  end
117
-
118
- should "accept arbitrary options" do
117
+
118
+ it "accept arbitrary options" do
119
119
  assert_equal({:type => :squeak, :volume => 'loud', :source => 'mum'}, @processor.address_for(:type => :squeak, :volume => 'loud', :source => 'mum'))
120
120
  end
121
-
122
- should "complain if no type given" do
121
+
122
+ it "complain if no type given" do
123
123
  assert_raises RuntimeError do
124
124
  @processor.address_for(:source => 'mum')
125
125
  end
126
126
  end
127
-
128
- should "complain if no source given" do
127
+
128
+ it "complain if no source given" do
129
129
  assert_raises RuntimeError do
130
130
  @processor.address_for(:type => :footsteps)
131
131
  end
@@ -133,12 +133,12 @@ class RequestProcessorTest < ActiveSupport::TestCase
133
133
  end
134
134
  end
135
135
 
136
- class RequestProcessorHooksTest < ActiveSupport::TestCase
136
+ class RequestProcessorHooksTest < MiniTest::Spec
137
137
  include Apotomo::TestCaseMethods::TestController
138
138
  include Apotomo::TestCaseMethods
139
-
140
- context "Hooks in RequestProcessor" do
141
- setup do
139
+
140
+ describe "Hooks in RequestProcessor" do
141
+ before do
142
142
  @kid = mouse_mock(:kid)
143
143
  @class = Class.new(Apotomo::RequestProcessor)
144
144
  @class.instance_eval do
@@ -147,31 +147,31 @@ class RequestProcessorHooksTest < ActiveSupport::TestCase
147
147
  end
148
148
  @class.kid = @kid
149
149
  end
150
-
151
- context ":after_initialize hook" do
152
- should "be called after the has_widgets blocks invokation" do
150
+
151
+ describe ":after_initialize hook" do
152
+ it "be called after the has_widgets blocks invokation" do
153
153
  @class.after_initialize do |r|
154
154
  r.root[:mum] << self.class.kid # requires that :mum is there, yet.
155
155
  end
156
-
157
- @r = @class.new(parent_controller, {},
156
+
157
+ @r = @class.new(parent_controller, {},
158
158
  [Proc.new { |root| root << widget(:mouse, :mum) }])
159
-
159
+
160
160
  assert @r.root[:mum][:kid]
161
161
  end
162
162
  end
163
-
164
- context ":after_fire hook" do
165
- should "be called in #process_for after fire" do
163
+
164
+ describe ":after_fire hook" do
165
+ it "be called in #process_for after fire" do
166
166
  @class.after_fire do |r|
167
167
  r.root[:mum] << self.class.kid
168
168
  end
169
-
169
+
170
170
  # DISCUSS: maybe add a trigger test here?
171
- @r = @class.new(parent_controller, {},
171
+ @r = @class.new(parent_controller, {},
172
172
  [Proc.new { |root| root << widget(:mouse, :mum) }])
173
173
  @r.process_for(:source => "root", :type => :noop) # calls ~after_fire.
174
-
174
+
175
175
  assert @r.root[:mum][:kid]
176
176
  end
177
177
  end
@@ -1,60 +1,60 @@
1
1
  require 'test_helper'
2
2
  require 'apotomo/test_case'
3
3
 
4
- class TestCaseTest < Test::Unit::TestCase
5
-
4
+ class TestCaseTest < MiniTest::Spec
5
+
6
6
  class CommentsWidgetTest < Apotomo::TestCase
7
7
  end
8
-
8
+
9
9
  class CommentsWidget < Apotomo::Widget
10
10
  end
11
-
12
- context "TestCase" do
13
-
14
- context "responding to #root" do
11
+
12
+ describe "TestCase" do
13
+
14
+ describe "responding to #root" do
15
15
  class MouseWidgetTest < Apotomo::TestCase
16
16
  end
17
-
18
- setup do
17
+
18
+ before do
19
19
  @klass = MouseWidgetTest
20
20
  @test = @klass.new(:widget).tap{ |t| t.setup }
21
21
  @klass.has_widgets { |r| r << widget(:mouse, 'mum', :eating) }
22
22
  end
23
-
24
- should "respond to #root" do
23
+
24
+ it "respond to #root" do
25
25
  assert_equal ['root', 'mum'], @test.root.collect { |w| w.name }
26
26
  end
27
-
28
- should "raise an error if no has_widgets block given" do
27
+
28
+ it "raise an error if no has_widgets block given" do
29
29
  exc = assert_raises RuntimeError do
30
30
  @test = Class.new(Apotomo::TestCase).new(:widget).tap{ |t| t.setup }
31
31
  @test.root
32
32
  end
33
-
33
+
34
34
  assert_equal "Please setup a widget tree using has_widgets()", exc.message
35
35
  end
36
-
37
- should "memorize root" do
36
+
37
+ it "memorize root" do
38
38
  @test.root.visible=false
39
39
  assert_equal false, @test.root.visible?
40
40
  end
41
-
42
- should "respond to #render_widget" do
41
+
42
+ it "respond to #render_widget" do
43
43
  assert_equal "<div id=\"mum\">burp!</div>\n", @test.render_widget('mum', :eat)
44
44
  assert_equal "<div id=\"mum\">burp!</div>\n", @test.last_invoke
45
45
  end
46
-
47
- should "respond to #assert_select" do
46
+
47
+ it "respond to #assert_select" do
48
48
  @test.render_widget('mum', :eat)
49
-
50
- assert_nothing_raised { @test.assert_select("div#mum", "burp!") }
51
-
49
+
50
+ @test.assert_select("div#mum", "burp!")
51
+
52
52
  exc = assert_raises( MiniTest::Assertion){ @test.assert_select("div#mummy", "burp!"); }
53
- assert_equal 'Expected at least 1 element matching "div#mummy", found 0.', exc.message
53
+ assert_match /Expected at least 1 element matching "div#mummy", found 0/, exc.message
54
54
  end
55
-
56
- context "using events" do
57
- setup do
55
+
56
+ describe "using events" do
57
+ before do
58
58
  @mum = @test.root['mum']
59
59
  @mum.respond_to_event :footsteps, :with => :squeak
60
60
  @mum.instance_eval do
@@ -63,28 +63,28 @@ class TestCaseTest < Test::Unit::TestCase
63
63
  end
64
64
  end
65
65
  end
66
-
67
- should "respond to #trigger" do
66
+
67
+ it "respond to #trigger" do
68
68
  assert_equal ["{}"], @test.trigger(:footsteps, 'mum')
69
69
  end
70
-
71
- should "pass options from #trigger to the evt" do
70
+
71
+ it "pass options from #trigger to the evt" do
72
72
  assert_equal(["{:direction=>:kitchen}"] , @test.trigger(:footsteps, 'mum', :direction => :kitchen))
73
73
  end
74
-
75
- should "respond to #assert_response" do
74
+
75
+ it "respond to #assert_response" do
76
76
  @test.trigger(:footsteps, 'mum')
77
77
  assert @test.assert_response("{}")
78
78
  end
79
79
  end
80
-
81
- context "#view_assigns" do
82
- should "be emtpy when nothing was set" do
80
+
81
+ describe "#view_assigns" do
82
+ it "be emtpy when nothing was set" do
83
83
  @test.render_widget('mum')
84
84
  assert_equal({}, @test.view_assigns)
85
85
  end
86
-
87
- should "return the instance variables from the last #render_widget" do
86
+
87
+ it "return the instance variables from the last #render_widget" do
88
88
  @mum = @test.root['mum']
89
89
  @mum.instance_eval do
90
90
  def sleep
@@ -96,17 +96,17 @@ class TestCaseTest < Test::Unit::TestCase
96
96
  end
97
97
  end
98
98
  end
99
-
100
- context "responding to parent_controller" do
101
- setup do
99
+
100
+ describe "responding to parent_controller" do
101
+ before do
102
102
  @test = Apotomo::TestCase.new(:widget).tap{ |t| t.setup }
103
103
  end
104
-
105
- should "provide a test controller" do
104
+
105
+ it "provide a test controller" do
106
106
  assert_kind_of ActionController::Base, @test.parent_controller
107
107
  end
108
-
109
- should "respond to #controller_path" do
108
+
109
+ it "respond to #controller_path" do
110
110
  assert_equal "barn", @test.parent_controller.controller_path
111
111
  end
112
112
  end
data/test/test_helper.rb CHANGED
@@ -1,9 +1,4 @@
1
- # wycats says...
2
- require 'rubygems'
3
- require 'bundler'
4
- Bundler.setup
5
-
6
- require 'shoulda'
1
+ require 'minitest/autorun'
7
2
 
8
3
  ENV['RAILS_ENV'] = 'test'
9
4
  require "dummy/config/environment"
@@ -18,10 +13,19 @@ Apotomo::Widget.append_view_path(File.expand_path(File.dirname(__FILE__) + "/wid
18
13
  require "test_case_methods"
19
14
 
20
15
 
21
- Test::Unit::TestCase.class_eval do
16
+ MiniTest::Spec.class_eval do
17
+ include Apotomo::WidgetShortcuts
18
+ include Apotomo::TestCaseMethods
19
+
20
+ def assert_not(assertion)
21
+ assert !assertion
22
+ end
23
+ end
24
+
25
+ ActiveSupport::TestCase.class_eval do
22
26
  include Apotomo::WidgetShortcuts
23
27
  include Apotomo::TestCaseMethods
24
-
28
+
25
29
  def assert_not(assertion)
26
30
  assert !assertion
27
31
  end
@@ -30,7 +34,7 @@ end
30
34
  class ApotomoController < ActionController::Base
31
35
  include Apotomo::Rails::ControllerMethods
32
36
  include Rails.application.routes.url_helpers
33
-
37
+
34
38
  def mum
35
39
  end
36
40
  end
@@ -50,7 +54,7 @@ class MouseWidget < Apotomo::Widget
50
54
  def eat
51
55
  render
52
56
  end
53
-
57
+
54
58
  def display
55
59
  end
56
60
  end
@@ -1,19 +1,14 @@
1
1
  require 'test_helper'
2
2
 
3
- class TreeNodeTest < ActiveSupport::TestCase
4
- context "initialization" do
5
- setup do
6
-
7
- end
8
-
9
- should "return true for #root? without parent" do
3
+ class TreeNodeTest < MiniTest::Spec
4
+ describe "initialization" do
5
+ it "return true for #root? without parent" do
10
6
  assert MouseWidget.new(nil, :mum).root?
11
7
  end
12
-
13
- should "return false for #root? with parent" do
8
+
9
+ it "return false for #root? with parent" do
14
10
  @mum = MouseWidget.new(nil, :mum)
15
11
  assert_not MouseWidget.new(@mum, :kid).root?
16
12
  end
17
-
18
13
  end
19
14
  end