folio-testing

Provide Ruby/Rails testing guidelines for the Folio CMS.

10|2|Updated Jul 10, 2017
One-click install
npx skills add https://github.com/sinfin/folio --skill folio-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: folio-testing
Source: https://github.com/sinfin/folio/tree/main/.skills/folio-testing
Command: npx skills add https://github.com/sinfin/folio --skill folio-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps streamline testing and development processes in Folio, making it easier to write, manage, and maintain tests for the Folio gem and host applications.

Core Features & Use Cases

  • Testing Conventions: Provides best practices for writing Folio and host-app tests, including behavior-facing assertions and test structure.
  • ViewComponent Testing: Specific guidelines for testing ViewComponents, focusing on rendered output and avoiding private methods.
  • Environment and Configuration: Offers rules for test environments to avoid mutating global state and how to manage environment variables.
  • Verification: Suggests the order and type of tests to run after making changes, ensuring code quality and functionality.

Quick Start

Apply the 'folio-testing' skill to review and update your test suite for the Folio gem or a Folio-based application.

Frequently Asked Questions about folio-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the best practices for Rails testing in a Folio CMS application?

Rails testing in Folio CMS prioritizes behavior-facing assertions and structured test design. You should focus on validating rendered output and avoiding direct calls to private methods to maintain clean test suites.

How do I test ViewComponents in Folio without accessing private methods?

ViewComponent testing in Folio should focus exclusively on rendered output rather than invoking private methods directly. This approach ensures your tests validate visible behavior and remain resilient to internal refactoring.

How do I manage environment variables and avoid mutating global state in Ruby test suites?

Ruby test suites require strict environment management to avoid mutating global state. You should isolate environment variables within test configurations and reset them appropriately to ensure consistent test execution.

Do I need prior Ruby on Rails experience to apply Folio testing conventions?

Yes, applying Folio testing conventions requires prior knowledge of Ruby on Rails testing tools and the Folio CMS. The guidelines assume familiarity with Rails environments, assertions, and test structure.

What order and type of tests should I run after making changes to a Folio gem?

After making changes to a Folio gem, you should run verification tests in the suggested order to ensure code quality and functionality. This structured verification confirms your modifications maintain expected behavior.