Permalink
Browse files

Autotest makes us move these files elsewhere, more changes to make te…

…sting

work
  • Loading branch information...
paulcbetts committed Nov 23, 2007
1 parent 586b430 commit bbdd640e6cb59cddeb058ebf0d1f6ea9a1994035
View
@@ -54,6 +54,11 @@ Rake::TestTask.new("test") do |t|
t.warning = true
end
+desc "Run code coverage"
+task :coverage do |t|
+ sh "rcov -xrefs " + Dir.glob("test/**/*.rb").join(' ') + " 2>/dev/null"
+end
+
# Default Action
task :default => [
:taglib,
@@ -62,6 +67,11 @@ task :default => [
:expandify,
]
+task :alltests => [
+ :test,
+ :coverage
+]
+
#######################
## Gettext section
View
@@ -1,9 +1,9 @@
#!/bin/sh
targetfile=$(basename $1)
-if [ -e test/unit/test_$targetfile ]; then
+if [ -e test/test_$targetfile ]; then
mkdir -p test/missing
- zentest $1 test/unit/test_$targetfile > test/missing/test_$targetfile
+ zentest $1 test/test_$targetfile > test/missing/test_$targetfile
else
- zentest $1 > test/unit/test_$targetfile
+ zentest $1 > test/test_$targetfile
fi
View
@@ -33,10 +33,10 @@ module Platform
class << self
def os
return :linux if RUBY_PLATFORM =~ /linux/
- return :windows if RUBY_PLATFORM =~ /win/
+ return :osx if RUBY_PLATFORM =~ /darwin/
return :solaris if RUBY_PLATFORM =~ /solaris/
return :bsd if RUBY_PLATFORM =~ /bsd/
- return :osx if RUBY_PLATFORM =~ /darwin/
+ return :windows if RUBY_PLATFORM =~ /win/
end
def home_dir
@@ -0,0 +1,4 @@
+# Code Generated by ZenTest v. 3.6.1
+# classname: asrt / meth = ratio%
+# Platform: 2 / 5 = 40.00%
+# Number of errors detected: 0
File renamed without changes.
@@ -2,7 +2,12 @@
# classname: asrt / meth = ratio%
# TagLibTagger: 0 / 3 = 0.00%
+$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
+
require 'test/unit' unless defined? $ZENTEST and $ZENTEST
+require 'library'
+
+require 'taggers/estelle-taglib'
class TestTagLibTagger < Test::Unit::TestCase
def test_class_instance
@@ -5,7 +5,10 @@
# ShellScriptList: 0 / 6 = 0.00%
# DebugList: 0 / 6 = 0.00%
+$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
+
require 'test/unit' unless defined? $ZENTEST and $ZENTEST
+require 'execute_list'
class TestDebugList < Test::Unit::TestCase
def test_begin
View
@@ -0,0 +1,45 @@
+# Code Generated by ZenTest v. 3.6.1
+# classname: asrt / meth = ratio%
+# MusicLibrary: 0 / 11 = 0.00%
+
+$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
+
+require 'test/unit' unless defined? $ZENTEST and $ZENTEST
+require 'library'
+
+class TestMusicLibrary < Test::Unit::TestCase
+ def test_clear
+ raise NotImplementedError, 'Need to write test_clear'
+ end
+
+ def test_create_action_list
+ raise NotImplementedError, 'Need to write test_create_action_list'
+ end
+
+ def test_empty_eh
+ ml = MusicLibrary.new
+ assert ml.empty?
+ end
+
+ def test_execute_action_list
+ raise NotImplementedError, 'Need to write test_execute_action_list'
+ end
+
+ def test_find_soundtracks
+ raise NotImplementedError, 'Need to write test_find_soundtracks'
+ end
+
+ def test_is_soundtrack_equals
+ raise NotImplementedError, 'Need to write test_is_soundtrack_equals'
+ end
+
+ def test_load_taggers
+ raise NotImplementedError, 'Need to write test_load_taggers'
+ end
+
+ def test_size
+ raise NotImplementedError, 'Need to write test_size'
+ end
+end
+
+# Number of errors detected: 9
File renamed without changes.
@@ -2,30 +2,30 @@
# classname: asrt / meth = ratio%
# Platform: 0 / 5 = 0.00%
-$:.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib')
+$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
require 'test/unit' unless defined? $ZENTEST and $ZENTEST
-require 'platform'
+require 'platform'
class TestPlatform < Test::Unit::TestCase
def test_class_binary_dir
- raise NotImplementedError, 'Need to write test_class_binary_dir'
+ assert_equal(AppConfig::RootDir + "/bin", Platform.binary_dir)
end
def test_class_home_dir
- assert (Platform.home_dir == "/Users/paul/.estelle")
+ assert_equal("#{ENV['HOME']}/.estelle", Platform.home_dir)
end
def test_class_os
- raise NotImplementedError, 'Need to write test_class_os'
+ assert_equal(:osx, Platform.os)
end
def test_class_settings_file_path
- raise NotImplementedError, 'Need to write test_class_settings_file_path'
+ assert_equal(ENV["hOME"], Platform.settings_file_path)
end
def test_class_which
- raise NotImplementedError, 'Need to write test_class_which'
+ assert_equal(`which ls`, Platform.which("ls"))
end
end
@@ -2,7 +2,10 @@
# classname: asrt / meth = ratio%
# EstelleSettings: 0 / 3 = 0.00%
+$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
+
require 'test/unit' unless defined? $ZENTEST and $ZENTEST
+require 'settings'
class TestEstelleSettings < Test::Unit::TestCase
def test_class_load
@@ -2,7 +2,10 @@
# classname: asrt / meth = ratio%
# Song: 0 / 10 = 0.00%
+$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
+
require 'test/unit' unless defined? $ZENTEST and $ZENTEST
+require 'song'
class TestSong < Test::Unit::TestCase
def test_class_sub_table
@@ -2,7 +2,10 @@
# classname: asrt / meth = ratio%
# File: 0 / 24 = 0.00%
+$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
+
require 'test/unit' unless defined? $ZENTEST and $ZENTEST
+require 'taggers/taglib'
class TestFile < Test::Unit::TestCase
def test_class_atime
@@ -3,7 +3,10 @@
# TaskQueue: 0 / 6 = 0.00%
# Task: 0 / 2 = 0.00%
+$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
+
require 'test/unit' unless defined? $ZENTEST and $ZENTEST
+require 'utility'
class TestTask < Test::Unit::TestCase
def test_call
View
@@ -1,41 +0,0 @@
-# Code Generated by ZenTest v. 3.6.1
-# classname: asrt / meth = ratio%
-# MusicLibrary: 0 / 11 = 0.00%
-
-require 'test/unit' unless defined? $ZENTEST and $ZENTEST
-
-class TestMusicLibrary < Test::Unit::TestCase
- def test_clear
- raise NotImplementedError, 'Need to write test_clear'
- end
-
- def test_create_action_list
- raise NotImplementedError, 'Need to write test_create_action_list'
- end
-
- def test_empty_eh
- raise NotImplementedError, 'Need to write test_empty_eh'
- end
-
- def test_execute_action_list
- raise NotImplementedError, 'Need to write test_execute_action_list'
- end
-
- def test_find_soundtracks
- raise NotImplementedError, 'Need to write test_find_soundtracks'
- end
-
- def test_is_soundtrack_equals
- raise NotImplementedError, 'Need to write test_is_soundtrack_equals'
- end
-
- def test_load_taggers
- raise NotImplementedError, 'Need to write test_load_taggers'
- end
-
- def test_size
- raise NotImplementedError, 'Need to write test_size'
- end
-end
-
-# Number of errors detected: 9

0 comments on commit bbdd640

Please sign in to comment.