spec/spec_helper.rb in rspec-apotomo-0.9.1 vs spec/spec_helper.rb in rspec-apotomo-0.9.2

- old
+ new

@@ -1,2 +1,30 @@ require 'bundler' -Bundler.setup \ No newline at end of file +Bundler.setup + +require "action_controller/railtie" + +Rails.application = Class.new(Rails::Application) +# Rails.application.routes.append do |r| +# r.match "/render_event_response", :as => :apotomo_event_path +# end + +# This class is used as a dummy widget for testing + +module Rails + def root + Pathname.new(__FILE__).dirname.dirname.dirname + end +end + +require 'rspec/rails/example/widget_example_group' + +# This class is used as a dummy widget for testing +class DummyWidget < Apotomo::Widget + responds_to_event :doo + + def display + @some_variable = :some_value + render + end +end +DummyWidget.append_view_path "spec/fixtures"