forked from pmoran/xmatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
30 lines (24 loc) · 755 Bytes
/
Rakefile
1
2
3
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
$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
require "rubygems"
require "rake"
require "rake/clean"
require 'xmatch'
require "spec/rake/spectask"
Spec::Rake::SpecTask.new(:spec) do |spec|
spec.libs << 'lib' << 'spec'
spec.spec_files = FileList['spec/**/*_spec.rb']
spec.spec_opts << "--color"
end
task :default => :spec
Spec::Rake::SpecTask.new(:rcov) do |spec|
spec.libs << 'lib' << 'spec'
spec.spec_files = FileList['spec/**/*_spec.rb']
spec.rcov = true
end
desc "Match two xml documents"
task :match, :lhs, :rhs do |t, args|
puts "** Matching #{args[:lhs]} with #{args[:rhs]}"
xml = Matcher::Xml.new(File.read(args[:lhs]))
xml.match(File.read(args[:rhs]))
Matcher::HtmlFormatter.new(xml, :prefix => "test").format
end