Class: NUnit
- Inherits:
-
Object
- Object
- NUnit
- Defined in:
- lib/rakeoff/tests.rb
Instance Attribute Summary collapse
-
#assemblies ⇒ Object
Returns the value of attribute assemblies.
Instance Method Summary collapse
- #execute(pattern) ⇒ Object
-
#initialize(session) ⇒ NUnit
constructor
A new instance of NUnit.
Constructor Details
#initialize(session) ⇒ NUnit
Returns a new instance of NUnit.
8 9 10 |
# File 'lib/rakeoff/tests.rb', line 8 def initialize(session) @session = session end |
Instance Attribute Details
#assemblies ⇒ Object
Returns the value of attribute assemblies.
6 7 8 |
# File 'lib/rakeoff/tests.rb', line 6 def assemblies @assemblies end |
Instance Method Details
#execute(pattern) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rakeoff/tests.rb', line 12 def execute(pattern) print_heading("Tests - #{pattern}") projects = get_test_projects_for(pattern) if(!projects.empty?) project_list = projects.join(' ').strip if(ENV["NUNIT_RUNNER"].nil?) mkdir_p File.join(@session.output_dir, '/test-reports') nunit = Dir.glob(File.join(@session.tools_dir, '/**/nunit-console.exe')).last sh "#{nunit} #{project_list} /xml=#{File.join(@session.output_dir, '/test-reports/nunit.xml')}" else sh "#{ENV["NUNIT_RUNNER"]} v4.0 x86 NUnit-2.5.3 #{project_list}" end end end |