{"id":13535392,"url":"https://github.com/farcaller/shiny","last_synced_at":"2025-04-22T19:31:13.182Z","repository":{"id":18898730,"uuid":"22116939","full_name":"farcaller/shiny","owner":"farcaller","description":"a shiny test framework for rust","archived":false,"fork":false,"pushed_at":"2016-05-14T09:04:57.000Z","size":19,"stargazers_count":95,"open_issues_count":0,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-02T02:46:28.947Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/farcaller.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-22T19:03:01.000Z","updated_at":"2024-12-13T14:33:56.000Z","dependencies_parsed_at":"2022-07-12T21:50:33.802Z","dependency_job_id":null,"html_url":"https://github.com/farcaller/shiny","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farcaller%2Fshiny","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farcaller%2Fshiny/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farcaller%2Fshiny/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/farcaller%2Fshiny/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/farcaller","download_url":"https://codeload.github.com/farcaller/shiny/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250176301,"owners_count":21387366,"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":[],"created_at":"2024-08-01T08:00:55.466Z","updated_at":"2025-04-22T19:31:12.866Z","avatar_url":"https://github.com/farcaller.png","language":"Rust","funding_links":[],"categories":["代码","Crates"],"sub_categories":["测试","Harnesses/Frameworks"],"readme":"Ooh, shiny!\n===========\n\n[![Build Status](https://travis-ci.org/farcaller/shiny.svg)](https://travis-ci.org/farcaller/shiny)\n\nShiny makes you less distracted with copying over initialization code in test cases. It also has a fancy syntax similar to Ruby's RSpec or Objective-C's Kiwi.\n\nInstallation\n------------\n\nInstall in the usual way with cargo.\n\nUsage\n-----\n\nAdd the `shiny` crate:\n\n```rust\n#![feature(plugin)]\n#![plugin(shiny)]\n```\n\nWrite your shiny test case:\n```rust\n#[cfg(test)]\nmod test {\n  describe!(\n    before_each {\n      let awesome = true;\n    }\n\n    it \"is awesome\" {\n      assert!(awesome);\n    }\n\n    it \"injects before_each into all test cases\" {\n      let still_awesome = awesome;\n      assert!(still_awesome);\n    }\n  )\n}\n```\n\nAll the items from `before_each` are inserted as-is into each generated test case function. Mind the final semicolon in `before_each block`!\n\nTODO\n----\n\n * add support for `context` to do recursive prologue injections\n * better filtering for test case name\n\nLicense\n-------\n\nShiny is distributed under Apache-2.0, see LICENSE for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarcaller%2Fshiny","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarcaller%2Fshiny","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarcaller%2Fshiny/lists"}