spec/spec_helper.rb in sinsiliux-hornsby-0.2.0 vs spec/spec_helper.rb in sinsiliux-hornsby-0.2.1
- old
+ new
@@ -2,19 +2,19 @@
require 'activerecord'
spec_dir = File.dirname(__FILE__)
Dir.chdir spec_dir
-ActiveRecord::Base.logger = Logger.new(spec_dir + "/debug.log")
+ActiveRecord::Base.logger = Logger.new("debug.log")
-databases = YAML::load(IO.read(spec_dir + "/db/database.yml"))
+databases = YAML::load(IO.read("db/database.yml"))
db_info = databases[ENV["DB"] || "test"]
ActiveRecord::Base.establish_connection(db_info)
-load(File.join(spec_dir, "db", "schema.rb"))
+load(File.join("db", "schema.rb"))
require 'spec/autorun'
require '../lib/hornsby'
require 'db/fruit'
Spec::Runner.configure do |config|
- Hornsby.configure_rspec(config, :filename => File.join(spec_dir, 'hornsby_scenario.rb'), :scenarios => :cherry)
+ Hornsby.configure_rspec(config, :filename => File.join('hornsby_scenario.rb'), :scenarios => :big_cherry)
end