Aruba is a Ruby gem designed for testing command-line applications. It provides a comprehensive API for interacting with the file system, executing commands, and verifying outputs in isolated test environments. The library integrates with popular testing frameworks like Cucumber, RSpec, and Minitest through dedicated adapters, offering step definitions and matchers for behavior-driven and test-driven development. Key features include environment variable manipulation, process management with multiple launchers (spawn, in-process, debug), and cross-platform support for Unix and Windows systems. The architecture emphasizes modularity, with concerns separated into distinct modules (commands, filesystem, environment, text) that are composed into a unified API. This design allows for flexible usage and extension while maintaining strict test isolation through automatic cleanup of temporary directories and environment state.
Mongoid-RSpec is a Ruby gem that provides RSpec matchers for testing Mongoid documents. It offers a comprehensive set of matchers for validating associations, validations, fields, timestamps, and other Mongoid-specific features. The library is designed to work across multiple versions of Mongoid (from 3.x to 9.x) by using a compatibility layer to abstract away API differences. The code is well-organized into matcher-specific files, demonstrating good separation of concerns and handling of version-specific complexities.