Permalink
Browse files

tests properly require ferret

  • Loading branch information...
1 parent 61aa93f commit b319e15337b83a57b2cf2f29c65a95797482b47a Noah Zoschke committed Dec 10, 2012
Showing with 9 additions and 7 deletions.
  1. +0 −2 Rakefile
  2. +8 −2 tests/unit/test_ferret.rb
  3. +1 −3 tests/unit/test_helper.rb
View
@@ -5,7 +5,5 @@ require "rake/testtask"
task default: :test
Rake::TestTask.new :test do |t|
- #$:.unshift << File.expand_path(File.join(File.dirname(__FILE__), "lib"))
- #t.libs << "lib/"
t.pattern = "./tests/unit/test_ferret.rb"
end
View
@@ -1,6 +1,12 @@
-require "minitest/autorun"
+require_relative "./test_helper"
+
+class TestFerret < TestBase
+ def test_bash_true
+ bash(name: :true, stdin: <<-'EOF')
+ true
+ EOF
+ end
-class TestFerret < MiniTest::Unit::TestCase
def test_true
assert true
end
@@ -7,7 +7,7 @@
$logdevs = [StringIO.new]
-require_relative "../lib/ferret"
+require "ferret"
class TestBase < MiniTest::Unit::TestCase
def setup
@@ -18,8 +18,6 @@ def setup
def logs
$logdevs[0].rewind
- #$logdevs[0].read
- #$logdevs[0].read.gsub(/val=[0-9.]+/, "val=X")
$logdevs[0].read.gsub(/val=([0-9]+)\.([0-9]+)/, "val=X.Y") # mask floating point values
end
end

0 comments on commit b319e15

Please sign in to comment.