Sha256: 44f763023709f47df7371a04ca0a1ba9a954b02b05bb52e7507c30554e8f6484

Contents?: true

Size: 1.14 KB

Versions: 4

Compression:

Stored size: 1.14 KB

Contents

# wycats says...
require 'rubygems'
require 'bundler'
Bundler.setup

require 'shoulda'

ENV['RAILS_ENV'] = 'test'
require "dummy/config/environment"
require "rails/test_help" # sets up ActionController::TestCase's @routes

require 'cells'
require 'apotomo'

Apotomo::Widget.append_view_path(File.expand_path(File.dirname(__FILE__) + "/widgets"))

# Load test support files.
require File.join(File.dirname(__FILE__), "support/test_case_methods")


Test::Unit::TestCase.class_eval do
  include Apotomo::WidgetShortcuts
  include Apotomo::TestCaseMethods
  
  def assert_not(assertion)
    assert !assertion
  end
end

class ApotomoController < ActionController::Base
  include Apotomo::Rails::ControllerMethods
  include Rails.application.routes.url_helpers
end

module Farm
  class BarnController < ApotomoController
  end
end

class MouseWidget < Apotomo::Widget
end


class MouseWidget < Apotomo::Widget
  def squeak
    render :text => "squeak!"
  end
  def eating
    render
  end
  def eat
    render
  end
  
end

# Enable dynamic states so we can do Cell.class_eval { def ... } at runtime.
Apotomo::Widget.class_eval do
  def action_method?(*); true; end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
apotomo-1.1.2 test/test_helper.rb
apotomo-1.1.1 test/test_helper.rb
apotomo-1.1.0 test/test_helper.rb
apotomo-1.1.0.rc1 test/test_helper.rb