spec/javascripts/support/jasmine_helper.rb in ponytail-0.3.0 vs spec/javascripts/support/jasmine_helper.rb in ponytail-0.4.0
- old
+ new
@@ -8,6 +8,22 @@
# @config.boot_files = lambda { ['/absolute/path/to/boot_dir/file.js'] }
#end
#
Jasmine.configure do |config|
config.browser = :phantomjs
+
+ # for coffeescript
+ config.boot_dir = File.expand_path('boots', File.dirname(__FILE__))
+end
+
+# monkey patch for coffeescript
+module Jasmine
+ def self.runner_template
+ File.read(File.join(File.dirname(__FILE__), "run.html.erb"))
+ end
+
+ class CoreConfiguration
+ def boot_path
+ File.expand_path('boots', File.dirname(__FILE__))
+ end
+ end
end