RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: stuartc
Site: www.twitter.com/stucorbishley
I see you have require_tree . twice in the file.
require_tree .
You only need it once, at the bottom of the file. Root level files get required first, if you use require_tree. So raffler.js.coffee is getting processed before all the other files, such as the routers etc.
Thanks for this, it's so obvious! But yet I completely overlooked it! :)
Agreed Dan, I've been through hell trying to get controller tests with this stuff.
I see you have
require_tree .
twice in the file.You only need it once, at the bottom of the file.
Root level files get required first, if you use require_tree.
So raffler.js.coffee is getting processed before all the other files, such as the routers etc.
Thanks for this, it's so obvious! But yet I completely overlooked it! :)
Agreed Dan, I've been through hell trying to get controller tests with this stuff.