Sha256: 13d697feae8ecb312966b9fc8b2a713dfa8a5ff2854572e8ec6761cbb766daa7

Contents?: true

Size: 1.93 KB

Versions: 23

Compression:

Stored size: 1.93 KB

Contents

#
# nunit dlls may be specified with
# NUNIT=FileList.new('**/*.Test.dll')
#
# for nunit dlls that must be run in x86 mode,
# NUNIT_x86=FileList.new('**/*.x86.Test.dll')
#


class Test < Array
	def update
		add 'rspec' if File.exists?('spec')

		if(defined?(NUNIT))
			NUNIT.each{|nunit_dll|
				add "\"#{Test.nunit_console}\" \"#{Rake.application.original_dir}\\#{nunit_dll}\" /xml:\"#{nunit_dll}.TestResults.xml\""
			}
		end

		if(defined?(NUNIT_X86))
			NUNIT_X86.each{|nunit_dll|
				add "\"#{Test.nunit_console_x86}\" \"#{Rake.application.original_dir}\\#{nunit_dll}\" /xml:\"#{nunit_dll}.TestResults.xml\""
			}
		end

		if(defined?(TESTS))
			TEST.each{|t| add t}
		end
	end

    @@nunit_console=''
	def self.nunit_console
		if(!File.exists?(@@nunit_console))
			if(defined?(NUNIT_CONSOLE))
				@@nunit_console = NUNIT_CONSOLE 
			end
			@@nunit_console = "C:\\Program Files (x86)\\NUnit 2.6.4\\bin\\nunit-console.exe" if(!File.exists?(@@nunit_console))
			@@nunit_console = "C:\\Program Files (x86)\\NUnit 2.6.3\\bin\\nunit-console.exe" if(!File.exists?(@@nunit_console))
		end
		if(!File.exists?(@@nunit_console))
			raise "unable to locate nunit-console.exe, assign NUNIT_CONSOLE to the correct location."
		end
		@@nunit_console
	end

	@@nunit_console_x86=''
	def self.nunit_console_x86
		if(!File.exists?(@@nunit_console_x86))
			if(defined?(NUNIT_CONSOLE_X86))
				@@nunit_console_x86 = NUNIT_CONSOLE_X86 
			end
			@@nunit_console_x86 = "C:\\Program Files (x86)\\NUnit 2.6.4\\bin\\nunit-console-x86.exe" if(!File.exists?(@@nunit_console_x86))
			@@nunit_console_x86 = "C:\\Program Files (x86)\\NUnit 2.6.3\\bin\\nunit-console-x86.exe" if(!File.exists?(@@nunit_console_x86))
		end
		if(!File.exists?(@@nunit_console_x86))
			raise "unable to locate nunit-console-x86.exe, assign NUNIT_CONSOLE_X86 to the correct location."
		end
		@@nunit_console_x86
	end
end

NUNIT=FileList.new('bin/**/*.Test.dll')

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
dev-2.0.123 lib/commands/test.rb
dev-2.0.122 lib/commands/test.rb
dev-2.0.121 lib/commands/test.rb
dev-2.0.119 lib/commands/test.rb
dev-2.0.118 lib/commands/test.rb
dev-2.0.117 lib/commands/test.rb
dev-2.0.116 lib/commands/test.rb
dev-2.0.115 lib/commands/test.rb
dev-2.0.114 lib/commands/test.rb
dev-2.0.113 lib/commands/test.rb
dev-2.0.112 lib/commands/test.rb
dev-2.0.111 lib/commands/test.rb
dev-2.0.110 lib/commands/test.rb
dev-2.0.109 lib/commands/test.rb
dev-2.0.108 lib/commands/test.rb
dev-2.0.107 lib/commands/test.rb
dev-2.0.106 lib/commands/test.rb
dev-2.0.105 lib/commands/test.rb
dev-2.0.104 lib/commands/test.rb
dev-2.0.103 lib/commands/test.rb