Rakefile in runcible-0.4.12 vs Rakefile in runcible-1.0.0

- old
+ new

@@ -14,11 +14,11 @@ "Runs the unit tests" Rake::TestTask.new :unit do |t| t.pattern = 'test/unit/test_*.rb' end - [:resources, :extensions].each do |task_name| + [:resources, :extensions, :unit].each do |task_name| desc "Runs the #{task_name} tests" task task_name do options = {} options[:mode] = ENV['mode'] || 'none' @@ -55,25 +55,9 @@ original_regex = /Latest Live Tested Version: *.*/ pulp_version = `rpm -q pulp-server`.strip replacement_string = "Latest Live Tested Version: **#{pulp_version}**" replace = text.gsub!(original_regex, replacement_string) file.puts replace - end -end - -desc "Finds functions without dedicated tests" -task :untested do - test_functions = `grep -r 'def test_' test/ --exclude-dir=test/fixtures --include=*.rb --no-filename` - lib_functions = `grep -r 'def self' lib/ --exclude=base.rb --include=*.rb --no-filename` - - test_functions = test_functions.split("\n").map{ |str| str.strip.split("def test_")[1] }.to_set - lib_functions = lib_functions.split("\n").map{ |str| str.strip.split("def self.")[1].split("(").first }.to_set - - difference = (lib_functions - test_functions).to_a - - if !difference.empty? - puts difference - exit 1 end end desc "Clears out all cassette files" task :clear_cassettes do