1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[libvirt] skip tests if ruby-libvirt is unavailable

This commit is contained in:
geemus 2012-05-28 13:06:46 -05:00
parent b081342b44
commit cca977fa2d

View file

@ -18,3 +18,11 @@ for provider in (all_providers - available_providers)
Formatador.display_line("[yellow]Skipping tests for [bold]#{provider}[/] [yellow]due to lacking credentials (add some to '~/.fog' to run them)[/]")
Thread.current[:tags] << ('-' << provider)
end
# mark libvirt tests pending if not setup
begin
require('ruby-libvirt')
rescue LoadError
Formatador.display_line("[yellow]Skipping tests for [bold]#{provider}[/] [yellow]due to missing `ruby-libvirt` gem.[/]")
Thread.current[:tags] << '-libvirt'
end