{"id":17508136,"url":"https://github.com/erwinjunker/regressor","last_synced_at":"2025-04-09T20:09:09.604Z","repository":{"id":27436964,"uuid":"30914971","full_name":"erwinjunker/regressor","owner":"erwinjunker","description":"Generate specs for your rails application the easy way. Regressor generates model and controller specs based on validations, associations, enums, database, routes, callbacks. Use regressor to capture your rails application behaviour. ","archived":false,"fork":false,"pushed_at":"2023-04-20T22:46:07.000Z","size":184,"stargazers_count":206,"open_issues_count":6,"forks_count":33,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-20T09:01:52.270Z","etag":null,"topics":["generator","rspec","test-automation"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erwinjunker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-02-17T11:54:50.000Z","updated_at":"2024-10-20T01:44:23.000Z","dependencies_parsed_at":"2023-01-14T06:44:59.595Z","dependency_job_id":"5e462661-7e6d-49af-9e75-971d39a5a2a1","html_url":"https://github.com/erwinjunker/regressor","commit_stats":{"total_commits":189,"total_committers":12,"mean_commits":15.75,"dds":"0.10052910052910058","last_synced_commit":"9e8a4fa5a1fd9003ef0eaea8595490fe6a100cac"},"previous_names":["erwinjunker/regressor","ndea/regressor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erwinjunker%2Fregressor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erwinjunker%2Fregressor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erwinjunker%2Fregressor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erwinjunker%2Fregressor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erwinjunker","download_url":"https://codeload.github.com/erwinjunker/regressor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246523870,"owners_count":20791444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["generator","rspec","test-automation"],"created_at":"2024-10-20T04:01:39.736Z","updated_at":"2025-04-02T17:09:55.222Z","avatar_url":"https://github.com/erwinjunker.png","language":"Ruby","readme":"\n[![Gem Version](https://badge.fury.io/rb/regressor.svg)](http://badge.fury.io/rb/regressor)\n[![Code Climate](https://codeclimate.com/repos/5506977e6956803f8f003bea/badges/946b605251d8ad324625/gpa.svg)](https://codeclimate.com/repos/5506977e6956803f8f003bea/feed)\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/ndea/regressor/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n\n# Regressor\nRegressor is a regression based testing tool.\nWhat is regression testing? [see here](http://en.wikipedia.org/wiki/Regression_testing).\nYou can generate specs based on your ActiveRecord models.\n\nMade with ♥ at [Qurasoft](http://qurasoft.de)\n\n# Get Regressor\n###### Directly from GitHub\n```ruby\ngem 'regressor', git: 'https://github.com/ndea/regressor.git', branch: 'master'\n```\nor \n###### Rubygems\n```ruby\ngem 'regressor', '~\u003e 0.6.2'\n```\n\n# Install\n```bash\nbundle install\nrails g regressor:install\n```\nThis will create an initializer in config/initializers. This initializers looks like this:\n###### Initializer\n```ruby\n# If the regressor gem is inside a group wrap your initializer in\n# if defined?(Regressor) do .. end\nRegressor.configure do |config|\n  # Defines the path where the generated files for your models will be placed\n  # config.regression_path = 'spec/models/regression'\n\n  # Defines the path where the generated files for your controllers will be placed\n  # config.regression_controller_path = 'spec/controllers/regression'\n\n  # Exclude Models for regression spec generation.\n  # Provide model names as String (e.g. 'User')\n  # config.excluded_models = []\n\n  # Exclude Controllers for regression generation.\n  # Provide controller names as String (e.g. 'UsersController').\n  # config.excluded_controllers = []\n\n  # If you are using enums in Rails 4 enable this option to generate regression specs for enums.\n  # If your Rails version is =\u003c Rails 3 set this option to false.\n  # Default this option is set to true.\n  # config.include_enums = true\nend\n```\n\nThen require the gem dependency 'shoulda-matchers' in your rails_helper (or spec_helper if you're using RSpec 2.x):\n```ruby\nrequire 'shoulda/matchers'\n```\n\nIf you are using mongoid please add [mongoid-rspec](https://github.com/mongoid-rspec/mongoid-rspec).\n\n# Usage\n###### Run the generator:\nBe sure to run the generators in the `test` environment so that `development`-only gems are not being loaded, causing strange issues with controller filters and ActiveRecord callbacks.\n\n##### ActiveRecord \n```ruby\nRAILS_ENV=test rails generate regressor:model # Create Regression specs for your models\nRAILS_ENV=test rails generate regressor:controller # Create Regression specs for your controllers\n```\n##### Mongoid\n```ruby\nRAILS_ENV=test rails generate regressor:mongoid:model # Create regression specs for your mongoid models\n```\n\n##### Factories\nYou can even generate empty factories for your models simply by running\n```ruby\nRAILS_ENV=test rails generate regressor:factory # Create empty factories based on your models\n```\n\n##### Supported Regressions\n##### Factories\nEmpty factories can be created. \n\n##### Models\n\n###### ActiveRecord\n - Relations\n   - belongs_to\n   - has_many\n   - has_one\n - Nested Attributes\n - Validations\n   - Length\n   - Presence\n   - Numericality\n - Database\n   - Columns\n   - Indexes\n - Enums (Rails 4)\n \n###### Mongoid\n - Relations\n   - belongs_to\n   - has_many\n   - has_one\n   - embeds_one\n   - embeds_many\n - Database\n   - Fields\n - Document\n   - Includes\n   - Versioning\n\n###### Controllers\n - Routing\n - Callbacks\n   - Before filter\n   - After filter\n   - Around filter\n\n# Also see\n[Airpair - Generate specs for your Rails application](https://www.airpair.com/rspec/posts/gert) \n\n[Guard for regressor](https://github.com/patrick-nits/guard-regressor)\n\n# Contributing\n\n1. Fork it ( https://github.com/ndea/regressor/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n# Contribution topics wanted\n\n- Specs\n- Documentation\n- Bugfixes\n- Codestyle\n- Anything that improves this gem\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferwinjunker%2Fregressor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferwinjunker%2Fregressor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferwinjunker%2Fregressor/lists"}