From 600c3b356d804546bfa31fef89979cc1c44f3756 Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Thu, 28 Nov 2013 14:36:36 +0000 Subject: Move strip_attributes out of vendor/plugins --- lib/strip_attributes/test/test_helper.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/strip_attributes/test/test_helper.rb (limited to 'lib/strip_attributes/test/test_helper.rb') diff --git a/lib/strip_attributes/test/test_helper.rb b/lib/strip_attributes/test/test_helper.rb new file mode 100644 index 000000000..7d06c40db --- /dev/null +++ b/lib/strip_attributes/test/test_helper.rb @@ -0,0 +1,20 @@ +require 'test/unit' +require 'rubygems' +require 'active_record' + +PLUGIN_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "..")) + +$LOAD_PATH.unshift "#{PLUGIN_ROOT}/lib" +require "#{PLUGIN_ROOT}/init" + +class ActiveRecord::Base + alias_method :save, :valid? + def self.columns() + @columns ||= [] + end + + def self.column(name, sql_type = nil, default = nil, null = true) + @columns ||= [] + @columns << ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, sql_type, null) + end +end -- cgit v1.2.3