diff --git a/vendor/assets/javascripts/lolex.js b/lib/assets/javascripts/lolex.js similarity index 100% rename from vendor/assets/javascripts/lolex.js rename to lib/assets/javascripts/lolex.js diff --git a/vendor/assets/javascripts/time_cop.rb b/lib/assets/javascripts/time_cop.js.rb similarity index 100% rename from vendor/assets/javascripts/time_cop.rb rename to lib/assets/javascripts/time_cop.js.rb diff --git a/lib/hyper-spec/component_test_helpers.rb b/lib/hyper-spec/component_test_helpers.rb index ffc6c19..cd0bd8c 100644 --- a/lib/hyper-spec/component_test_helpers.rb +++ b/lib/hyper-spec/component_test_helpers.rb @@ -1,9 +1,8 @@ # see component_test_helpers_spec.rb for examples - require 'parser/current' require 'unparser' require 'method_source' -require_relative '../../vendor/assets/javascripts/time_cop' # 'hyper-spec/time_cop' +require_relative '../../lib/assets/javascripts/time_cop.js.rb' module HyperSpec module ComponentTestHelpers @@ -50,9 +49,11 @@ def build_test_url_for(controller) page = "\n#{page}" page = "\n#{page}" if code - - page = "<%= javascript_include_tag 'time_cop' %>\n#{page}" if render_on != :server_only || Lolex.initialized? - + if render_on != :server_only || Lolex.initialized? + page = "\n#{page}" + end if (render_on != :server_only && !render_params[:layout]) || javascript page = "<%= javascript_include_tag '#{javascript || 'application'}' %>\n#{page}" end