# As you can see you'll need to run these tesxts in the context of a Rals application # as it requires the whole environment to be loaded.' ENV["RAILS_ENV"] = "test" require 'test/unit' require File.expand_path(File.dirname(__FILE__) + "/../../../../config/environment") require 'test_help' class UnobtrusiveJavascriptControllerStub attr_reader :js_behaviours, :request def initialize @js_behaviours = [] @request = ActionController::TestRequest.new end def register_js_behaviour(selector, behaviour, opts) @js_behaviours << { :selector => selector, :behaviour => behaviour } end end