test/lib/vedeu/models/presentation_test.rb in vedeu-0.0.30 vs test/lib/vedeu/models/presentation_test.rb in vedeu-0.0.31

- old
+ new

@@ -5,35 +5,22 @@ class TestPresentation include Presentation end describe Presentation do - let(:described_module) { Presentation } - let(:described_instance) { TestPresentation.new(attributes) } - let(:attributes) { - { - colour: {}, - style: ['bold', 'underline'] - } - } - describe '#colour' do - let(:subject) { described_instance.colour } - it 'returns a Colour instance' do - subject.must_be_instance_of(Colour) + TestPresentation.new({ + colour: { foreground: '#ff0000', background: '#333333' } + }).colour.must_be_instance_of(Colour) end end describe '#style' do - let(:subject) { described_instance.style } - - it 'returns a String' do - subject.must_be_instance_of(String) - end - it 'has a style attribute' do - subject.must_equal("\e[1m\e[4m") + TestPresentation.new({ + style: ['bold', 'underline'] + }).style.must_equal("\e[1m\e[4m") end end end end