Rakefile in dawnscanner-1.6.1 vs Rakefile in dawnscanner-1.6.2
- old
+ new
@@ -94,10 +94,12 @@
file.puts "\t\t\t\t# include PatternMatchCheck"
file.puts "\t\t\t\t# include DependencyCheck"
file.puts "\t\t\t\t# include RubyVersionCheck"
file.puts ""
file.puts "\t\t\t\tdef initialize"
+ file.puts "\t\t\t\t\ttitle = \"\""
+ file.puts "\t\t\t\t\tmessage = \"\""
file.puts "\t\t\t\tend"
file.puts "\t\t\tend"
file.puts "\t\tend"
file.puts "end"
end
@@ -111,27 +113,27 @@
file.puts "\t\t@check = Dawn::Kb::#{class_name}.new"
file.puts "\t\t# @check.debug = true"
file.puts "\tend"
file.puts "\tit \"is reported when the vulnerable gem is detected\" do"
file.puts "\t\t@check.dependencies = [{:name=>\"\", :version=>\"\"}]"
- file.puts "\t\t@check.vuln?.should == true"
+ file.puts "\t\texpect(@check.vuln?).to eq(true)"
file.puts "\tend"
file.puts "\tit \"is not reported when a fixed release is detected\" do"
file.puts "\t\t@check.dependencies = [{:name=>\"\", :version=>\"\"}]"
- file.puts "\t\t@check.vuln?.should == false"
+ file.puts "\t\texpect(@check.vuln?).to eq(false)"
file.puts "\tend"
file.puts "end"
end
puts "#{spec_filename} created"
puts "*** PLEASE IMPLEMENT TEST FOR #{name} IN ./spec/lib/dawn/codesake_knowledgebase_spec.rb in order to reflect changes"
puts "*** PLEASE ADD THIS CODE IN ./lib/dawn/knowledge_base.rb in order to reflect changes"
puts "require \"dawn/kb/#{class_name.downcase}\""
puts "it \"must have test for #{name}\" do"
puts " sc = kb.find(\"#{name}\")"
- puts " sc.should_not be_nil"
- puts " sc.class.should == Dawn::Kb::#{class_name}"
+ puts " expect(sc).not_to be_nil"
+ puts " expect(sc.class).to eq(Dawn::Kb::#{class_name})"
puts "end"
end
@@ -163,10 +165,12 @@
file.puts "\t\t\t\t# include PatternMatchCheck"
file.puts "\t\t\t\t# include DependencyCheck"
file.puts "\t\t\t\t# include RubyVersionCheck"
file.puts ""
file.puts "\t\t\t\tdef initialize"
+ file.puts "\t\t\t\t\ttitle = \"\""
+ file.puts "\t\t\t\t\tmessage = \"\""
file.puts "\t\t\t\tend"
file.puts "\t\t\tend"
file.puts "\t\tend"
file.puts "end"
end
@@ -180,15 +184,15 @@
file.puts "\t\t@check = Dawn::Kb::#{class_name}.new"
file.puts "\t\t# @check.debug = true"
file.puts "\tend"
file.puts "\tit \"is reported when the vulnerable gem is detected\" do"
file.puts "\t\t@check.dependencies = [{:name=>\"\", :version=>\"\"}]"
- file.puts "\t\t@check.vuln?.should == true"
+ file.puts "\t\texpect(@check.vuln?).to eq(true)"
file.puts "\tend"
file.puts "\tit \"is not reported when a fixed release is detected\" do"
file.puts "\t\t@check.dependencies = [{:name=>\"\", :version=>\"\"}]"
- file.puts "\t\t@check.vuln?.should == false"
+ file.puts "\t\texpect(@check.vuln?).to eq(false)"
file.puts "\tend"
file.puts "end"
end
puts "#{spec_filename} created"
@@ -196,11 +200,11 @@
puts "*** PLEASE IMPLEMENT TEST FOR #{name} IN ./spec/lib/dawn/codesake_knowledgebase_spec.rb in order to reflect changes"
puts "*** PLEASE ADD THIS CODE IN ./lib/dawn/knowledge_base.rb in order to reflect changes"
puts "require \"dawn/kb/#{class_name.downcase}\""
puts "it \"must have test for #{name}\" do"
puts " sc = kb.find(\"#{name}\")"
- puts " sc.should_not be_nil"
- puts " sc.class.should == Dawn::Kb::#{class_name}"
+ puts " expect(sc).not_to be_nil"
+ puts " expect(sc.class).to eq(Dawn::Kb::#{class_name})"
puts "end"
end