-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathRakefile
38 lines (30 loc) · 1.2 KB
/
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
31
32
33
34
35
36
37
38
desc 'Run the flog metrics tool on the StringCalculator class'
task :flog do
system 'flog -agme lib/string_calculator.rb | grep -v lib/string_calculator | tee /dev/tty | pbcopy'
end
desc 'Highlight source code from the clipboard back onto the clipboard (suitable for Keynote)'
task :keynote do
system 'pbpaste | highlight --out-format rtf --font-size 24 --font Menlo --plug-in highlight/rspec.lua --config-file highlight/twilight.theme --style twilight --src-lang ruby | pbcopy'
end
desc 'Highlight source code from the clipboard back onto the clipboard (suitable for Pages)'
task :pages do
system 'pbpaste | highlight --out-format rtf --font-size 10 --font Menlo --src-lang ruby --line-numbers | pbcopy'
end
desc 'Run mutation testing to assess the characterization'
task :mutate do
system 'mutant --include lib --require string_calculator --use rspec .score'
end
desc 'Approve the received characterization'
task :approve do
mv received, approved
end
private
def received
characterization_filename :received
end
def approved
characterization_filename :approved
end
def characterization_filename(status)
"spec/fixtures/approvals/string_calculator/knows_how_to_add_values_in_strings.#{status}.txt"
end