Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix up specs

  • Loading branch information...
commit b5e471912875e37bb8cf6e4c74c3556f3e082cf8 1 parent bd31392
@danlucraft danlucraft authored
View
4 spec/help_spec.rb
@@ -1,6 +1,4 @@
-
-
-require File.dirname(__FILE__) + "/spec_helpers"
+require "spec_helper"
describe "Rak", "help and errors" do
before(:all) do
View
5 spec/rak_spec.rb
@@ -1,8 +1,5 @@
-require 'fileutils'
-require 'rbconfig'
-
-require File.dirname(__FILE__) + "/spec_helpers"
+require "spec_helper"
describe "Rak", "with no options" do
it "prints all matches from files in the current directory" do
View
6 spec/spec_helpers.rb → spec/spec_helper.rb
@@ -1,8 +1,9 @@
require 'fileutils'
+require 'rbconfig'
require "pathname"
HERE = Pathname(__FILE__).parent.expand_path
-require(HERE.join("../lib/rak"))
+require HERE.join("../lib/rak").to_s
def strip_ansi(str)
str.gsub /\033\[(\d;)?\d+m/, ""
@@ -25,7 +26,7 @@ def rak(argstring="", opts={})
cmd = "#{ruby_bin} #{bin_rak} #{argstring}"
cmd = "#{opts[:pipe]} | #{cmd}" if opts[:pipe]
ENV['RAK_TEST'] = "true" unless opts[:test_mode] == false
- dir = opts[:dir] || HERE+"example"
+ dir = opts[:dir] || HERE + "example"
Dir.chdir(dir) do
%x{#{cmd}}
end
@@ -37,3 +38,4 @@ def rak(argstring="", opts={})
def sort_lines(str)
str.split("\n").sort.join("\n")
end
+
Please sign in to comment.
Something went wrong with that request. Please try again.