# frozen_string_literal: true RSpec.describe Hanami::Helpers::AssetsHelper, "#video", :app_integration do subject(:obj) { helpers = described_class Class.new { include helpers attr_reader :_context def initialize(context) @_context = context end }.new(context) } def video_tag(...) subject.video_tag(...) end let(:context) { TestApp::Views::Context.new } let(:root) { make_tmp_directory } before do with_directory(root) do write "config/app.rb", <<~RUBY module TestApp class App < Hanami::App config.logger.stream = StringIO.new end end RUBY write "app/views/context.rb", <<~RUBY # auto_register: false require "hanami/view/context" module TestApp module Views class Context < Hanami::View::Context end end end RUBY stub_assets("movie.mp4", "movie.en.vtt") require "hanami/setup" before_prepare if respond_to?(:before_prepare) require "hanami/prepare" end end it "returns an instance of HtmlBuilder" do actual = video_tag("movie.mp4") expect(actual).to be_instance_of(::Hanami::View::HTML::SafeString) end it "renders