{"id":14991269,"url":"https://github.com/igor-starostenko/tune_spec","last_synced_at":"2026-01-04T14:43:48.762Z","repository":{"id":59158252,"uuid":"106071305","full_name":"igor-starostenko/tune_spec","owner":"igor-starostenko","description":"BDD DSL for Page Objects in Ruby","archived":false,"fork":false,"pushed_at":"2020-01-09T05:23:11.000Z","size":80,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T02:12:06.867Z","etag":null,"topics":["calabash","design-pattern","e2e","e2e-tests","qa","qatools","rspec","ruby","ruby-gem","spec","test","test-automation","test-framework","testing"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/tune_spec","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/igor-starostenko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-07T04:27:43.000Z","updated_at":"2021-02-10T17:59:45.000Z","dependencies_parsed_at":"2022-09-13T20:10:55.323Z","dependency_job_id":null,"html_url":"https://github.com/igor-starostenko/tune_spec","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igor-starostenko%2Ftune_spec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igor-starostenko%2Ftune_spec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igor-starostenko%2Ftune_spec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igor-starostenko%2Ftune_spec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igor-starostenko","download_url":"https://codeload.github.com/igor-starostenko/tune_spec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244898406,"owners_count":20528335,"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":["calabash","design-pattern","e2e","e2e-tests","qa","qatools","rspec","ruby","ruby-gem","spec","test","test-automation","test-framework","testing"],"created_at":"2024-09-24T14:22:03.905Z","updated_at":"2026-01-04T14:43:48.722Z","avatar_url":"https://github.com/igor-starostenko.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TuneSpec\n\n[![Gem Version](https://badge.fury.io/rb/tune_spec.svg)](https://badge.fury.io/rb/tune_spec)\n[![Build Status](https://travis-ci.com/igor-starostenko/tune_spec.svg?branch=master)](https://travis-ci.com/igor-starostenko/tune_spec)\n[![Maintainability](https://api.codeclimate.com/v1/badges/6d924fbd83bf675facf3/maintainability)](https://codeclimate.com/github/igor-starostenko/tune_spec/maintainability)\n\nProvides an easy to use DSL for Page Object model. Helps to organize large scale integration tests by following Convention over Configuration paradigm.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'tune_spec'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install tune_spec\n\n## Usage\n\nTo initialize framework folder structure run:\n\n    $ tune --init\n\nIt creates a folder tree within your working directory:\n\n```\nlib\n├── groups\n├── pages\n└── steps\n```\n\nInclude the module in your framework:\n\n```ruby\ninclude TuneSpec\n```\n\nThen you can use TuneSpec DSL to store instances of your Groups, Steps and Page objects.\nAssume that you have LoginPage object and LoginSteps and LoginGroups:\n```ruby\npages(:login).fill_in 'Email', with: 'user@example.com'\npages(:login).fill_in 'Password', with: 'password'\npages(:login).login.click\n```\n\nOr in your LoginSteps you can describe steps as a a group of interactions and verifications on a page:\n```ruby\nsteps(:login).visit_page\nsteps(:login).login_with_valid_credentials\nsteps(:login).verify_login\n```\n\nIf you have steps class not associated with a particular page you may want to use dependency injection:\n```ruby\nsteps(:header, page: :home).verify_menu\n```\nIn this case it creates a `#header_steps` method that stores an instance of `HeaderSteps` and a `#home_page` method with an instance of `HomePage` as a page object of `HeaderSteps`. Next time you call this step it will return the same instance unless you change the page object associated with it.\nPage initialization argument is set to `:page` by default. Can be changed with:\n```ruby\nTuneSpec.steps_page_arg = :page\n```\n\nYou can go further and organize your steps within a group when details don't matter\n```ruby\ngroups(:login).complete\n```\n\nThe default instantiation of each of your objects is configurable:\n```ruby\nTuneSpec.configure do |config|\n  config.page_opts = { env: ENV['TEST_ENV'] }\n  config.steps_opts = { env: ENV['TEST_ENV'], page: :home }\n  config.groups_opts = {}\nend\n```\n\n### Calabash\n\nIn order to use the gem with calabash page instantiation features you need to set `TuneSpec.calabash_enabled = true`. Or configure the gem:\n```ruby\nTuneSpec.configure do |config|\n  config.calabash_enabled = true\n  config.calabash_wait_opts = { timeout: 10 } # set by default\nend\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Testing\n\nTo test documentation with [yard-doctest](https://github.com/p0deje/yard-doctest), run `bundle exec yard doctest`. For unit tests run `bundle exec rake test`.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/igor-starostenko/tune_spec. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the TuneSpec project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/tune_spec/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figor-starostenko%2Ftune_spec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figor-starostenko%2Ftune_spec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figor-starostenko%2Ftune_spec/lists"}