test/test_helper.rb in delocalize-0.1.5 vs test/test_helper.rb in delocalize-0.1.6

- old
+ new

@@ -1,5 +1,7 @@ +# encoding: utf-8 + ENV["RAILS_ENV"] = "test" #require File.expand_path(File.dirname(__FILE__) + "/../../../../config/environment") require File.expand_path(File.dirname(__FILE__) + "/rails_app/config/environment") require 'test_help' @@ -55,9 +57,14 @@ :cant_think_of_a_sensible_time_field, :released_on, :published_at end class Product < ActiveRecord::Base +end + +class ProductWithValidation < Product + validates_numericality_of :price + validates_presence_of :price end config = YAML.load_file(File.dirname(__FILE__) + '/database.yml') ActiveRecord::Base.establish_connection(config['test'])