awesome-repositories.com
Blog
MCP
awesome-repositories.com

Découvrez les meilleurs dépôts open-source grâce à notre recherche par IA.

ExplorerRecherches sélectionnéesAlternatives open sourceLogiciels auto-hébergésBlogPlan du site
ProjetÀ proposNotre méthodologiePresseServeur MCP
Mentions légalesConfidentialitéConditions d'utilisation
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
rspec avatar

rspec/rspec-rails

0
View on GitHub↗
5,271 stars·1,047 forks·Ruby·MIT·10 vuesrspec.info↗

Rspec Rails

rspec-rails est un framework de test qui intègre RSpec à Ruby on Rails pour fournir des outils de développement piloté par le comportement (BDD). Il sert de suite pour définir le comportement de l'application via une syntaxe conversationnelle, offrant une boîte à outils spécialisée pour créer des spécifications comportementales pour les modèles, les contrôleurs et les vues.

Le projet se distingue par la génération automatique de tests, fournissant une interface en ligne de commande pour créer des fichiers de spécification boilerplate pour les composants Rails tels que les modèles, les contrôleurs et les tâches en arrière-plan. Il différencie ses capacités avec une bibliothèque complète de mocking et de stubbing, ainsi qu'une suite d'intégration d'applications web conçue pour simuler des cycles de requête complets et des interactions de navigateur.

Le framework couvre une large surface de tests d'intégration, incluant la vérification du routage, la validation du contenu des mailers et l'exécution des tâches en arrière-plan. Il fournit un large éventail d'assertions de test pour valider l'état des objets, les statuts de réponse HTTP et les résultats de requêtes de base de données, ainsi que des outils pour gérer les doubles de test via des espions (spies) et des stubs.

Le système inclut un exécutable en ligne de commande pour l'exécution des tests et un magasin de configuration persistant pour standardiser les paramètres entre les environnements.

Features

  • Behavioral Specifications - Implements a conversational BDD structure of examples and contexts to define application behavior.
  • Behavior Driven Development - Provides a framework for defining application behavior using a descriptive and conversational specification syntax.
  • CLI Execution - Provides a dedicated command-line executable to run the complete suite of behavioral specifications.
  • Method Stubbing - Implements method stubbing to define pre-determined return values or behaviors for objects during testing.
  • Dynamic Response Configurations - Allows defining return values using logic blocks to calculate results dynamically based on input.
  • Shared Test Contexts - Provides reusable blocks of setup and configuration shared across multiple test examples via metadata tags.
  • Dependency-Mocked Unit Testers - Isolates units of logic by replacing real system components with mocks, stubs, or spies.
  • Test Grouping Utilities - Organizes tests into nested groups to manage shared setup, teardown, and configuration inheritance.
  • Mocking and Spying Libraries - Ships a comprehensive suite for creating test doubles, mocks, and spies to isolate dependencies.
  • Request Cycle Testing - Validates the full request-response pipeline, including routing and middleware, by simulating HTTP requests.
  • Ruby on Rails Testing Frameworks - Integrates behavioral specifications with the Ruby on Rails framework to verify various application layers.
  • Shared Example Groups - Defines reusable sets of specifications and contexts that can be mixed into multiple test groups.
  • End-to-End Testing - Simulates complete user workflows across the entire application stack and browser to verify functional correctness.
  • Test Double Libraries - Provides a suite of test doubles, including mocks, stubs, and spies, to simulate external components.
  • Database Result Assertions - Provides assertions to verify that a database query returns the exact set of expected records.
  • Test Specification Templates - Creates boilerplate specification files by applying predefined templates to component names via a CLI.
  • Rails Component Generators - Automatically generates boilerplate specification files tailored to Rails models, controllers, and background jobs.
  • Test Execution Configurations - Manages test runner behavior through a command-line interface or a persistent configuration file.
  • Model Logic Testing - Includes frameworks and macros to verify the behavioral logic and data integrity of database-backed models.
  • Browser Interaction Testing - Simulates user browser interactions to verify high-level application functionality from an external perspective.
  • Controller Logic Testing - Simulates HTTP requests to controllers to verify rendered templates, redirects, and instance variables.
  • Test Metadata - Stores descriptive tags and location data for test groups to facilitate selective execution and reporting.
  • HTTP Response Assertions - Ships matchers to validate that HTTP responses return specific numeric status codes or categories.
  • Call Argument Matchers - Validates that methods are invoked with specific values using built-in or custom matching criteria.
  • Object Instrumentation - Adds mock behavior to existing real objects to intercept calls and return test data.
  • Rails Component Specifications - Provides specialized test configurations and helper modules tailored for Rails models, controllers, mailers, jobs, and views.
  • Class-Wide Stubbing - Applies stubs or expectations to every instance of a specific class for consistent behavior across tests.
  • Collection Membership Assertions - Includes assertions to verify that a collection contains specific items or matches another array exactly.
  • Exception Assertions - Verifies that a block of code raises a specific exception class or error message.
  • Mock Expectation Verifiers - Requires specific methods to be called before a test ends to ensure expected interactions occur.
  • Application Stack Flow Testing - Drives behavior through the entire application stack across multiple requests and sessions.
  • View Template Rendering Tests - Provides tools to verify that view templates render the correct content by simulating controller and path contexts.
  • Component-Specific Test Helpers - Loads specialized support functions and helper modules based on the type of Rails component being tested.
  • State Assertions - Compares objects for identity, equivalence, or type membership to ensure they match expected values.
  • Template Rendering Assertions - Verifies that a specific request results in the rendering of the intended view template or layout.
  • Test Boilerplate Generators - Automatically creates skeleton specification files for Rails components such as models and controllers.
  • Test Execution Filtering - Allows selective execution of test subsets based on descriptive tags and properties.
  • Interaction Spies - Records calls to an object and verifies they occurred after the fact using interaction spies.
  • Nested Setup Nodes - Provides hierarchical initialization structures through nested blocks to refine the test environment in a BDD tree.
  • Ruby Frameworks and Tools - RSpec testing framework for Rails.
  • Testing - Testing framework for Rails.
  • More to explore - Provides a testing framework.

Historique des stars

Graphique de l'historique des stars pour rspec/rspec-railsGraphique de l'historique des stars pour rspec/rspec-rails

Recherche par IA

Explorez plus de dépôts awesome

Décrivez vos besoins en langage naturel — l'IA classe des milliers de projets open source sélectionnés par pertinence.

Start searching with AI

Questions fréquentes

Que fait rspec/rspec-rails ?

rspec-rails est un framework de test qui intègre RSpec à Ruby on Rails pour fournir des outils de développement piloté par le comportement (BDD). Il sert de suite pour définir le comportement de l'application via une syntaxe conversationnelle, offrant une boîte à outils spécialisée pour créer des spécifications comportementales pour les modèles, les contrôleurs et les vues.

Quelles sont les fonctionnalités principales de rspec/rspec-rails ?

Les fonctionnalités principales de rspec/rspec-rails sont : Behavioral Specifications, Behavior Driven Development, CLI Execution, Method Stubbing, Dynamic Response Configurations, Shared Test Contexts, Dependency-Mocked Unit Testers, Test Grouping Utilities.

Quelles sont les alternatives open-source à rspec/rspec-rails ?

Les alternatives open-source à rspec/rspec-rails incluent : codeception/codeception — Codeception is a full-stack testing framework for PHP applications that provides a unified interface for unit,… rspec/rspec-mocks — This project is a Ruby unit testing tool designed for dependency isolation and behavioral contract verification. It… thomhurst/tunit — TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source… doctest/doctest — doctest is a lightweight C++ unit testing framework and assertion library. It provides a single-header implementation… onsi/ginkgo — Ginkgo is a behavior-driven development testing framework, assertion library, and test runner for Go. It provides a… behat/behat — Behat is a behavior-driven development framework and test automation tool for PHP. It functions as a Gherkin test…

Alternatives open source à Rspec Rails

Projets open source similaires, classés selon le nombre de fonctionnalités partagées avec Rspec Rails.
  • codeception/codeceptionAvatar de Codeception

    Codeception/Codeception

    4,855Voir sur GitHub↗

    Codeception is a full-stack testing framework for PHP applications that provides a unified interface for unit, functional, and acceptance testing. It serves as a tool for automating real desktop and mobile browsers via the WebDriver protocol and acts as a client for testing REST and SOAP APIs. The framework is distinguished by its support for Behavior-Driven Development, allowing users to write human-readable test specifications in Gherkin language to align technical tests with business requirements. It implements actor-based action mapping to connect these natural language steps to executabl

    PHP
    Voir sur GitHub↗4,855
  • rspec/rspec-mocksAvatar de rspec

    rspec/rspec-mocks

    1,148Voir sur GitHub↗

    This project is a Ruby unit testing tool designed for dependency isolation and behavioral contract verification. It functions as a comprehensive mocking framework that allows developers to replace real objects with controlled placeholders, ensuring that code interacts with its dependencies as expected during automated test execution. The framework distinguishes itself through its ability to perform partial double verification, which checks that stubbed methods exist on the underlying object to prevent tests from passing against incorrect interfaces. It also provides sophisticated constant man

    Rubyrspecruby
    Voir sur GitHub↗1,148
  • thomhurst/tunitAvatar de thomhurst

    thomhurst/TUnit

    3,744Voir sur GitHub↗

    TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source generation for test discovery and mock creation, ensuring compatibility with Native AOT and IL trimming by eliminating the need for runtime reflection and proxies. The framework provides specialized capabilities for integration testing, including the management of distributed application lifecycles, isolated database schemas, and the correlation of telemetry and logs across process boundaries via OTLP. It also includes an HTTP testing utility to intercept network exchanges and mock AP

    C#csharpdotnettest
    Voir sur GitHub↗3,744
  • doctest/doctestAvatar de doctest

    doctest/doctest

    6,765Voir sur GitHub↗

    doctest is a lightweight C++ unit testing framework and assertion library. It provides a single-header implementation that eliminates complex build dependencies, allowing developers to write and execute test cases directly within their source code. The framework is distinguished by its focus on compile-time performance and binary overhead. It uses conditional compilation guards to strip all testing logic and metadata from production binaries. Additionally, it features hierarchical subcases that re-execute parent setup code to isolate different execution paths within a single test case. Its c

    C++c-plus-pluscppcpp11
    Voir sur GitHub↗6,765
Voir les 30 alternatives à Rspec Rails→