This repository was archived by the owner on Oct 19, 2018. It is now read-only.
File tree 3 files changed +6
-5
lines changed
3 files changed +6
-5
lines changed File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
# see component_test_helpers_spec.rb for examples
2
-
3
2
require 'parser/current'
4
3
require 'unparser'
5
4
require 'method_source'
6
- require_relative '../../vendor /assets/javascripts/time_cop' # 'hyper-spec/time_cop '
5
+ require_relative '../../lib /assets/javascripts/time_cop.js.rb '
7
6
8
7
module HyperSpec
9
8
module ComponentTestHelpers
@@ -50,9 +49,11 @@ def build_test_url_for(controller)
50
49
page = "<script type='text/javascript'>\n #{ TOP_LEVEL_COMPONENT_PATCH } \n </script>\n #{ page } "
51
50
52
51
page = "<script type='text/javascript'>\n #{ code } \n </script>\n #{ page } " if code
53
-
54
- page = "<%= javascript_include_tag 'time_cop' %>\n #{ page } " if render_on != :server_only || Lolex . initialized?
55
-
52
+ if render_on != :server_only || Lolex . initialized?
53
+ page = "<script type='text/javascript'>\n " \
54
+ "<%= Rails.application.assets['time_cop.js'].source.html_safe %>\n " \
55
+ "</script>\n #{ page } "
56
+ end
56
57
if ( render_on != :server_only && !render_params [ :layout ] ) || javascript
57
58
page = "<%= javascript_include_tag '#{ javascript || 'application' } ' %>\n #{ page } "
58
59
end
You can’t perform that action at this time.
0 commit comments