test/rails/widget_generator_test.rb in apotomo-1.1.2 vs test/rails/widget_generator_test.rb in apotomo-1.1.3
- old
+ new
@@ -44,8 +44,18 @@
assert_file "app/widgets/gerbil/snuggle.html.slim", %r(app/widgets/gerbil/snuggle\.html\.slim)
assert_file "app/widgets/gerbil/snuggle.html.slim", %r(p)
assert_file "app/widgets/gerbil/squeak.html.slim", %r(app/widgets/gerbil/squeak\.html\.slim)
assert_file "test/widgets/gerbil_widget_test.rb"
end
+
+ should "work with namespaces" do
+ run_generator %w(Gerbil::Mouse squeak -t test_unit)
+
+ assert_file "app/widgets/gerbil/mouse_widget.rb", /class Gerbil::MouseWidget < Apotomo::Widget/
+ assert_file "app/widgets/gerbil/mouse_widget.rb", /def squeak/
+ assert_file "app/widgets/gerbil/mouse/squeak.html.erb", %r(app/widgets/gerbil/mouse/squeak\.html\.erb)
+ assert_file "test/widgets/gerbil/mouse_widget_test.rb"
+ end
+
end
end
end