From 7a518ee8a9f21f3624067b8f284b6cf4d0c10c20 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 5 Oct 2020 15:19:11 -0300 Subject: [PATCH] test de performance --- test/system/site_test.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/system/site_test.rb diff --git a/test/system/site_test.rb b/test/system/site_test.rb new file mode 100644 index 0000000..052db4e --- /dev/null +++ b/test/system/site_test.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +require 'test_helper' + +class SiteTest < ActiveSupport::TestCase + def site + @site ||= Site.new name: 'recursero', design_id: Design.find_by_gem('recursero-jekyll-theme').id + end + + test 'tiene una performance' do + skip unless ENV['TEST_PERFORMANCE'].present? + + site.read + + profile = StackProf.run mode: :object do + site.posts + end + + StackProf::Report.new(profile).print_text + end +end