Sha256: 219f8237a46e601c28597fe4aba9b77c6a27349e76a066d089a2be5ebb3aa526

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

# -*- encoding: utf-8 -*-
#
# Author:: Omer Katz (<omer@zimperium.com>)
#
# Copyright (C) 2014, Omer Katz
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

require 'busser/runner_plugin'

# A Busser runner plugin for Nose2.
#
# @author Omer Katz <omer.drow@gmail.com>
#
class Busser::RunnerPlugin::Nose2 < Busser::RunnerPlugin::Base
  postinstall do
    run!("pip install nose2")
  end

  def test
    if File.file?("#{suite_path('nose2')}/requirements.txt")
	puts "Installing test requirements."
	run!("pip install -r #{suite_path('nose2')}/requirements.txt")
    end
    run!("nose2 --start-dir #{suite_path('nose2').to_s}/tests")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
busser-nose2-0.1.6 lib/busser/runner_plugin/nose2.rb