Permalink
Browse files

Fix Ruby 1.9 compatibility.

'.' is no longer in the default $LOAD_PATH, so we need to expand
file paths when requiring local source files.

Signed-off-by: Coda Hale <coda.hale@gmail.com>
  • Loading branch information...
1 parent 79bcfae commit 812e12f884941325badb2553b22b5914d4b4bc91 @FooBarWidget FooBarWidget committed with codahale Aug 5, 2009
Showing with 3 additions and 3 deletions.
  1. +1 −1 spec/bcrypt/engine_spec.rb
  2. +1 −1 spec/bcrypt/password_spec.rb
  3. +1 −1 spec/spec_helper.rb
View
2 spec/bcrypt/engine_spec.rb
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), "..", "spec_helper")
+require File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_helper"))
context "The BCrypt engine" do
specify "should calculate the optimal cost factor to fit in a specific time" do
View
2 spec/bcrypt/password_spec.rb
@@ -1,4 +1,4 @@
-require File.join(File.dirname(__FILE__), "..", "spec_helper")
+require File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_helper"))
context "Creating a hashed password" do
View
2 spec/spec_helper.rb
@@ -1,4 +1,4 @@
-$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
+$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/../lib'))
require "rubygems"
require "spec"
require "bcrypt"

0 comments on commit 812e12f

Please sign in to comment.