Removed img_dir from set method, added specs

This commit is contained in:
Andy Meneely
2015-07-10 12:43:56 -04:00
parent b234a5a8e7
commit c66c6bc4f0
3 changed files with 25 additions and 5 deletions
+20
View File
@@ -15,4 +15,24 @@ describe Squib::Deck do
end
context '#set' do
it 'puts font in @font' do
deck = Squib::Deck.new do
set font: 'foo'
end
expect(deck.font).to eq ('foo')
end
it 'raises deprecation errors on img_dir' do
set_img_dir = Proc.new do
Squib::Deck.new do
set img_dir: 'foo'
end
end
expect { set_img_dir.call }.to raise_error('DEPRECATED: As of v0.7 img_dir is no longer supported in "set". Use config.yml instead.')
end
end
end