Sha256: 1acf0a99eb7e975797bba3c09d6a7b8baa0e16a76278639a052e72ae3d0147b5

Contents?: true

Size: 897 Bytes

Versions: 3

Compression:

Stored size: 897 Bytes

Contents

module Physique
  class TestConfig
    self.extend Albacore::ConfigDSL

    # Path to test runner executable
    attr_path :exe

    # Path to test runner executable
    attr_writer :files

    def opts
      Map.new({
        exe: @exe,
        files: @files
      })
    end
  end

  class TestsTasksBuilder < TasksBuilder
    def build_tasks
      add_test_tasks
    end

    def add_test_tasks
      configuration = solution.compile.configuration
      package_dir = solution.nuget.restore_location

      desc 'Run unit tests'
      test_runner :test => :compile do |tests|
        tests.files = FileList["**/*.Tests/bin/#{configuration}/*.Tests.dll"]
        tests.exe = locate_tool("#{package_dir}/NUnit.Runners.*/tools/nunit-console.exe")
        tests.parameters.add('/labels')
        tests.parameters.add('/trace=Verbose')
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
physique-0.3.3 lib/physique/task_builders/test.rb
physique-0.3.2 lib/physique/task_builders/test.rb
physique-0.3.1 lib/physique/task_builders/test.rb