Sha256: c2a0d2b7e8ae270d9e430c50641e3693d9d1a7b1760cfde714bee2bf481ef1d1

Contents?: true

Size: 1022 Bytes

Versions: 3

Compression:

Stored size: 1022 Bytes

Contents

require "test_helper"
require 'test_controller'
require 'support/mongoid'
require 'support/active_record'

class ActiveRecordControllerTest < ActionController::TestCase
  include Rails3JQueryAutocomplete::TestCase::ActiveRecord
  include Rails3JQueryAutocomplete::TestCase
end

class ActiveRecordSTIControllerTest < ActionController::TestCase
  include Rails3JQueryAutocomplete::TestCase::ActiveRecord
  include Rails3JQueryAutocomplete::TestCase

  def create_models
    @parent_movie_class = Object.const_set(:Movie, Class.new(::ActiveRecord::Base))
    @parent_movie_class.class_eval do
      def display_name
        "Movie: #{name}"
      end
    end
    @movie_class = Object.const_set(:HorrorMovie, Class.new(@parent_movie_class))
  end

  def destroy_models
    Object.send(:remove_const, :Movie)
    Object.send(:remove_const, :HorrorMovie)
  end

end

class MonogidControllerTest < ActionController::TestCase
  include Rails3JQueryAutocomplete::TestCase::Mongoid
  include Rails3JQueryAutocomplete::TestCase
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails3-jquery-autocomplete-0.7.2 test/implementations_test.rb
rails3-jquery-autocomplete-0.7.1 test/implementations_test.rb
rails3-jquery-autocomplete-0.7.0 test/implementations_test.rb