diff options
| author | Tom Black <[email protected]> | 2017-06-03 20:37:42 -0400 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2017-06-03 20:37:42 -0400 |
| commit | 596142429b0754535da32a7a72ac82e7d7df7787 (patch) | |
| tree | 3b49e63611fd5368b58e8cec175ea8feddc6275a /test | |
| parent | 3a694ffebcff71305d79c6e8c15246d671ce3888 (diff) | |
| download | ruby2d-596142429b0754535da32a7a72ac82e7d7df7787.tar.gz ruby2d-596142429b0754535da32a7a72ac82e7d7df7787.zip | |
Check if font file exists
Diffstat (limited to 'test')
| -rw-r--r-- | test/text_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 |
