Skip to content

Commit

Permalink
Some reoreded specs
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleas committed Feb 10, 2012
1 parent 075078f commit adac626
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions spec/unit/clamav_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ClamAV
'clam-v3.rar' => 'ClamAV-Test-File'
}

context "with default options" do
context "generic" do

it "should be instance of Clamav" do
@clam.should be_instance_of(ClamAV)
Expand All @@ -43,12 +43,6 @@ class ClamAV
@clam.version.should >= '0.97'
end

FILES.each do |file, result|
it "should scan #{file} with result #{result.to_s}" do
@clam.scanfile(File.join(File.dirname(__FILE__), "../clamav-testfiles/", file)).should == result
end
end

it "should return signatures count" do
@clam.signo.should >= 1134843 # on 10/02/2012
end
Expand All @@ -67,6 +61,16 @@ class ClamAV

end

context "scan with default options" do

FILES.each do |file, result|
it "should scan #{file} with result #{result.to_s}" do
@clam.scanfile(File.join(File.dirname(__FILE__), "../clamav-testfiles/", file)).should == result
end
end

end

context "scan with custom options" do

FILES_ENCRYPTED.each do |file, result|
Expand Down

0 comments on commit adac626

Please sign in to comment.