{"id":20057641,"url":"https://github.com/todesking/scalatest-morefunspec","last_synced_at":"2025-03-02T09:41:39.380Z","repository":{"id":28007101,"uuid":"31501594","full_name":"todesking/scalatest-morefunspec","owner":"todesking","description":null,"archived":false,"fork":false,"pushed_at":"2015-03-01T16:03:58.000Z","size":104,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-12T21:46:14.517Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","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/todesking.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":"2015-03-01T16:03:37.000Z","updated_at":"2017-05-09T05:34:39.000Z","dependencies_parsed_at":"2022-09-04T11:02:14.450Z","dependency_job_id":null,"html_url":"https://github.com/todesking/scalatest-morefunspec","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/todesking%2Fscalatest-morefunspec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todesking%2Fscalatest-morefunspec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todesking%2Fscalatest-morefunspec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todesking%2Fscalatest-morefunspec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/todesking","download_url":"https://codeload.github.com/todesking/scalatest-morefunspec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241488152,"owners_count":19970826,"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-11-13T12:59:46.637Z","updated_at":"2025-03-02T09:41:39.362Z","avatar_url":"https://github.com/todesking.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ScalaTest-MoreFunSpec: FunSpec + Subjects and RSpec like features\n\n## Current status\n\n* Under construction\n\n## Usage\n\n```scala\nlibraryDependencies += \"com.todesking\" %% \"scalatest-morefunspec\" % \"0.0.0\" % \"test\"\n```\n\n```scala\nimport com.todesking.scalatest.morefunspec.MoreFunSpec\n\nclass SeqSpec extends MoreFunSpec with org.scalatest.Matchers {\n  describe(\"Seq\") {\n    describe(\"when empty\") {\n      subject { Seq() }\n\n      it(\"size should 0\") {\n        // Refer the subject by call apply()\n        subject().size shouldEqual 0\n      }\n\n      // RSpec's one-liner syntax like feature\n      // (ref: https://relishapp.com/rspec/rspec-core/v/3-1/docs/subject/one-liner-syntax )\n      it shouldBe empty\n\n      // Above is same as this:\n      it(\"should be empty\") { subject().shouldBe empty }\n\n      describe(\"when a element added\") {\n        // Subject can be nested\n        // Can refer to outer subject\n        subject { subject() :+ 1 }\n\n        it should have size(1)\n      }\n    }\n\n    describe(\"+\") {\n      val seq1 = let { Seq(1, 2, 3) }\n      val seq2 = let { Seq(4, 5, 6) }\n      subject { seq1() + seq2() }\n\n      it should have size(6)\n      it shouldEqual Seq(1, 2, 3, 4, 5, 6)\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftodesking%2Fscalatest-morefunspec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftodesking%2Fscalatest-morefunspec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftodesking%2Fscalatest-morefunspec/lists"}