spec/samples/samples_regression_spec.rb in squib-0.5.1 vs spec/samples/samples_regression_spec.rb in squib-0.6.0
- old
+ new
@@ -1,22 +1,23 @@
require 'spec_helper'
require 'squib'
require 'pp'
describe "Squib samples" do
+ @SAMPLES_DIR = "#{File.expand_path(File.dirname(__FILE__))}/../../samples/"
let(:samples_dir) { "#{File.expand_path(File.dirname(__FILE__))}/../../samples/" }
around(:each) do |example|
Dir.chdir(samples_dir) do
example.run
end
end
- it 'should execute with no errors' do
- allow(Squib.logger).to receive(:warn) {}
- allow(ProgressBar).to receive(:create).and_return(Squib::DoNothing.new)
- Dir["#{samples_dir}/**/*.rb"].each do |sample|
+ Dir["#{@SAMPLES_DIR}/**/*.rb"].each do |sample|
+ it "should execute #{sample} with no errors", slow: true do
+ allow(Squib.logger).to receive(:warn) {}
+ allow(ProgressBar).to receive(:create).and_return(Squib::DoNothing.new)
load sample
end
end
# This test could use some explanation
@@ -55,20 +56,21 @@
custom_config.rb
draw_shapes.rb
embed_text.rb
excel.rb
gradients.rb
+ hand.rb
hello_world.rb
load_images.rb
portrait-landscape.rb
ranges.rb
saves.rb
showcase.rb
text_options.rb
tgc_proofs.rb
units.rb
).each do |sample|
- it "has not changed for #{sample}" do
+ it "has not changed for #{sample}", slow: true do
log = StringIO.new
mock_cairo(log)
load sample
# overwrite_sample(sample, log) # Use TEMPORARILY once happy with the new sample log
test_file_str = File.open(sample_regression_file(sample), 'r:UTF-8').read
\ No newline at end of file