spec/fontcustom/fontcustom_spec.rb in fontcustom-0.0.2 vs spec/fontcustom/fontcustom_spec.rb in fontcustom-0.1.0
- old
+ new
@@ -6,20 +6,22 @@
let(:fake_file) { output_dir + '/non-vector.txt' }
context 'when ouput_dir already contains files' do
# Compile, add non-fontcustom file, change input vectors, recompile
before(:all) do
- Fontcustom.compile(input_dir, output_dir)
+ # originals
+ Fontcustom.compile(input_dir, '-o', output_dir, '-n', 'Original Font')
FileUtils.touch(fake_file, :verbose => true)
@original_fonts = Dir[output_dir + '/fontcustom-*.{woff,eot,ttf,svg}']
@original_css = File.read(output_dir + '/fontcustom.css')
- FileUtils.mv(input_dir + '/B.svg', input_dir + '/E.svg', :verbose => true)
- Fontcustom.compile(input_dir, output_dir)
+
+ FileUtils.mv(input_dir + '/C.svg', input_dir + '/E.svg', :verbose => true)
+ Fontcustom.compile(input_dir, '-o', output_dir)
end
after(:all) do
cleanup(output_dir)
- FileUtils.mv(input_dir + '/E.svg', input_dir + '/B.svg', :verbose => true)
+ FileUtils.mv(input_dir + '/E.svg', input_dir + '/C.svg', :verbose => true)
end
it 'should delete previous fontcustom generated files' do
new_files = Dir[output_dir + '/*']
@original_fonts.each do |original|