4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/dev/cmd/Test.rb', line 4
def refresh
strip_auto_entries
if(Dir.glob("**/*.spec").count > 0)
rspec_cmd='rspec --pattern="**/*.spec"'
self << "{:cmd=>'#{rspec_cmd}', :auto=>true}"
end
Dir.glob("*.gemspec").each { |gs|
self << "{:cmd=>'gem install #{gs.gsub('.gemspec','')}-#{DEV[:version]}.gem', :capture_output=>true, :auto=>true}"
}
Dir.glob("**/*.{Test.csproj,Features.csproj}").each { |cs|
platforms=Dev::MsBuild.(cs)
platforms.each { |platform|
proj_path=File.dirname(cs)
dll_name="#{proj_path}/bin/#{platform}/Release/#{File.basename(cs,'.csproj')}.dll"
if platform=="x86"
self << "{:cmd=> '<paths,nunitx86> /xml:#{dll_name}.nunit-results.xml #{dll_name}', :auto=>true, :capture_output=>true, :capture_error=>true}" if RUBY_PLATFORM.include?("w32")
self << "{:cmd-> 'mono <paths,nunitx86> #{dll_name}', :auto=>true}" if !RUBY_PLATFORM.include?("w32")
else
self << "{:cmd=> '#{DEV[:paths][:nunit]} /xml:#{dll_name}.nunit-results.xml #{dll_name}', :auto=>true, :capture_output=>true, :capture_error=>true}" if RUBY_PLATFORM.include?("w32")
self << "{:cmd-> 'mono <paths,nunit> #{dll_name}', :auto=>true}" if !RUBY_PLATFORM.include?("w32")
end
}
}
end
|