Skip to content

Instantly share code, notes, and snippets.

@audionerd
Created December 29, 2010 05:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save audionerd/758229 to your computer and use it in GitHub Desktop.
Save audionerd/758229 to your computer and use it in GitHub Desktop.
jammit – add a failing test to illustrate missing route for "namespaced" javascript
---
test/unit/test_jammit_controller.rb | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/test/unit/test_jammit_controller.rb b/test/unit/test_jammit_controller.rb
index 914c612..25b6a72 100644
--- a/test/unit/test_jammit_controller.rb
+++ b/test/unit/test_jammit_controller.rb
@@ -66,4 +66,19 @@ class JammitControllerTest < ActionController::TestCase
Jammit.reload!
end
-end
+ def test_javascript_with_namespaces
+ assert_generates('/assets/namespace.module.js', {
+ :controller => 'jammit',
+ :action => 'package',
+ :package => 'namespace.module',
+ :extension => 'js'
+ })
+ assert_recognizes({
+ :controller => 'jammit',
+ :action => 'package',
+ :package => 'namespace.module',
+ :extension => 'js'
+ }, '/assets/namespace.module.js')
+ end
+
+end
\ No newline at end of file
--
1.7.3.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment