asciinema.org/spec/presenters/bare_asciicast_page_presenter_spec.rb

23 lines
680 B
Ruby
Raw Normal View History

2014-08-30 17:38:47 +00:00
require 'rails_helper'
describe BareAsciicastPagePresenter do
2014-02-01 09:29:49 +00:00
describe '.build' do
subject { described_class.build(asciicast, playback_options) }
let(:asciicast) { stub_model(Asciicast, decorate: decorated_asciicast) }
let(:playback_options) { { speed: 3.0 } }
let(:decorated_asciicast) { double('decorated_asciicast', theme_name: 'foo') }
2014-02-01 09:29:49 +00:00
it "builds presenter with given asciicast decorated" do
expect(subject.asciicast).to be(decorated_asciicast)
end
2014-02-01 09:29:49 +00:00
it "builds presenter with given playback options" do
expect(subject.playback_options.speed).to eq(3.0)
expect(subject.playback_options.theme).to eq('foo')
end
end
end