spec/spec_helper.rb in by_star-0.6.1 vs spec/spec_helper.rb in by_star-0.6.2
- old
+ new
@@ -9,22 +9,31 @@
require 'active_support'
require 'active_support/core_ext/string/conversions'
require 'by_star'
require 'spec'
+# Define time zone before loading test_helper
+zone = "UTC"
+Time.zone = zone
+ActiveRecord::Base.default_timezone = zone
+
+YAML::load_file(File.dirname(__FILE__) + "/database.yml").each do |key, connection|
+ ActiveRecord::Base.establish_connection(connection)
+ load File.dirname(__FILE__) + "/fixtures/schema.rb"
+ load File.dirname(__FILE__) + "/fixtures/models.rb"
+end
+
# bootstraping the plugin through init.rb
# tests how it would load in a real application
load File.dirname(__FILE__) + "/../rails/init.rb"
-
-ActiveRecord::Base.logger = Logger.new("tmp/activerecord.log")
-
# Print the location of puts/p calls so you can find them later
-
# def puts str
# super caller.first if caller.first.index("shoulda.rb") == -1
# super str
# end
#
# def p obj
# puts caller.first
# super obj
-# end
+# end
+
+ActiveRecord::Base.logger = Logger.new("tmp/activerecord.log")
\ No newline at end of file