# frozen_string_literal: true RSpec.describe "assets", type: :integration do describe "helpers" do it "renders assets tags" do with_project do generate "action web home#index --url=/" rewrite "apps/web/templates/app.html.erb", <<~EOF Web <%= favicon %> <%= stylesheet 'app' %> <%= yield %> <%= javascript 'app' %> EOF rewrite "apps/web/templates/home/index.html.erb", <<~EOF <%= image('app.jpg') %> <%= video('movie.mp4') %> <%= video do text "Your browser does not support the video tag" source src: view.asset_path('movie.mp4'), type: 'video/mp4' source src: view.asset_path('movie.ogg'), type: 'video/ogg' end %> EOF server do visit "/" expect(page.body).to include(%()) expect(page.body).to include(%()) expect(page.body).to include(%()) expect(page.body).to include(%(App)) expect(page.body).to include(%()) expect(page.body).to include(%()) end end end end end