spec/spec_helper.rb in redlander-0.3.6 vs spec/spec_helper.rb in redlander-0.4.0
- old
+ new
@@ -1,7 +1,18 @@
-require 'spec/autorun'
-
-require 'lib/redlander'
+require 'redlander'
include Redlander
-Spec::Runner.configure do |config|
+# Helpful testing methods
+Redlander.module_eval <<HERE
+ class << self
+ def root
+ '#{File.expand_path(File.join(File.dirname(__FILE__), ".."))}'
+ end
+
+ def fixture_path(filename = "")
+ File.join(root, "spec", "fixtures", filename)
+ end
+ end
+HERE
+
+RSpec.configure do |config|
end