spec/spec_helper.rb in by_star-0.5.2 vs spec/spec_helper.rb in by_star-0.6.0
- old
+ new
@@ -1,14 +1,15 @@
require 'rubygems'
-require 'activerecord'
+require 'active_record'
require 'fileutils'
+require 'logger'
FileUtils.mkdir_p("tmp")
ActiveRecord::Base.logger = Logger.new("tmp/activerecord.log")
$:.unshift(File.join(File.dirname(__FILE__), "../lib"))
-require 'activesupport'
+require 'active_support'
require 'by_star'
require 'spec'
# Define time zone before loading test_helper
zone = "UTC"
@@ -22,5 +23,15 @@
end
# bootstraping the plugin through init.rb
# tests how it would load in a real application
load File.dirname(__FILE__) + "/../rails/init.rb"
+# 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