Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…sting

work
  • Loading branch information...
commit bbdd640e6cb59cddeb058ebf0d1f6ea9a1994035 1 parent 586b430
@paulcbetts authored
View
10 Rakefile
@@ -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
6 build_unit_test
@@ -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
4 lib/platform.rb
@@ -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
View
4 test/missing/test_platform.rb
@@ -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
View
0  test/unit/test_config.rb → test/test_config.rb
File renamed without changes
View
5 test/unit/test_estelle-taglib.rb → test/test_estelle-taglib.rb
@@ -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
View
3  test/unit/test_execute_list.rb → test/test_execute_list.rb
@@ -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
45 test/test_library.rb
@@ -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
View
0  test/unit/test_main.rb → test/test_main.rb
File renamed without changes
View
14 test/unit/test_platform.rb → test/test_platform.rb
@@ -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
View
3  test/unit/test_settings.rb → test/test_settings.rb
@@ -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
View
3  test/unit/test_song.rb → test/test_song.rb
@@ -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
View
3  test/unit/test_taglib.rb → test/test_taglib.rb
@@ -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
View
3  test/unit/test_utility.rb → test/test_utility.rb
@@ -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
41 test/unit/test_library.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.