From 596142429b0754535da32a7a72ac82e7d7df7787 Mon Sep 17 00:00:00 2001 From: Tom Black Date: Sat, 3 Jun 2017 20:37:42 -0400 Subject: Check if font file exists --- test/text_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') diff --git a/test/text_spec.rb b/test/text_spec.rb index d2b8430..a787380 100644 --- a/test/text_spec.rb +++ b/test/text_spec.rb @@ -1,6 +1,11 @@ require 'ruby2d' RSpec.describe Ruby2D::Text do + describe '#new' do + it "raises exception if font file doesn't exist" do + expect { Text.new(font: 'bad_font.ttf') }.to raise_error(Ruby2D::Error) + end + end describe '#text=' do it 'maps Time to string' do -- cgit v1.2.3