diff options
| author | lstrzebinczyk <[email protected]> | 2017-04-29 20:16:05 +0200 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2018-10-04 23:22:16 -0700 |
| commit | b4bbf346ea7f124c8614467a0e47bd4062504d63 (patch) | |
| tree | 70b593e756530e409a3aa524c3f0c1c9a8a5c868 /test/text_spec.rb | |
| parent | 691ae68db759b6cbab5a4c1a9cee4dc472d4435f (diff) | |
| download | ruby2d-b4bbf346ea7f124c8614467a0e47bd4062504d63.tar.gz ruby2d-b4bbf346ea7f124c8614467a0e47bd4062504d63.zip | |
Text will use default font
Diffstat (limited to 'test/text_spec.rb')
| -rw-r--r-- | test/text_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/text_spec.rb b/test/text_spec.rb index 9a79532..67afe0e 100644 --- a/test/text_spec.rb +++ b/test/text_spec.rb @@ -6,10 +6,15 @@ RSpec.describe Ruby2D::Text do it "raises exception if font file doesn't exist" do expect { Text.new(font: "bad_font.ttf") }.to raise_error(Ruby2D::Error) end + + it "uses the system default font if one is not provided" do + t = Text.new + expect(t.font).to eq(Font.default) + end end describe "#text=" do - it 'maps Time to string' do + it "maps Time to string" do t = Text.new(font: "test/media/bitstream_vera/vera.ttf") t.text = Time.new(1, 1, 1, 1, 1, 1, 1) expect(t.text).to eq("0001-01-01 01:01:01 +0000") |
