Created
December 29, 2010 05:52
-
-
Save audionerd/758229 to your computer and use it in GitHub Desktop.
jammit – add a failing test to illustrate missing route for "namespaced" javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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