{"id":12878,"date":"2015-11-16T11:43:45","date_gmt":"2015-11-16T16:43:45","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=12878"},"modified":"2015-11-16T11:43:45","modified_gmt":"2015-11-16T16:43:45","slug":"nimble-matcher-framework","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2015\/11\/16\/nimble-matcher-framework\/","title":{"rendered":"Nimble Matcher Framework"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/Quick\/Nimble\">Nimble<\/a>:<\/p>\n<blockquote cite=\"https:\/\/github.com\/Quick\/Nimble\">\n<p>Use Nimble to express the expected outcomes of Swift or Objective-C expressions. Inspired by <a href=\"https:\/\/github.com\/pivotal\/cedar\">Cedar<\/a>.<\/p>\n<pre>\/\/ Swift\n\nexpect(1 + 1).to(equal(2))\nexpect(1.2).to(beCloseTo(1.1, within: 0.1))\nexpect(3) > 2\nexpect(\"seahorse\").to(contain(\"sea\"))\nexpect([\"Atlantic\", \"Pacific\"]).toNot(contain(\"Mississippi\"))\nexpect(ocean.isClean).toEventually(beTruthy())\n<\/pre>\n<\/blockquote>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Behavior-driven_development\">BDD<\/a> has never felt right to me, but I do like using a layer on top of XCTest&rsquo;s macros because they are both verbose and incomplete.<\/p>","protected":false},"excerpt":{"rendered":"<p>Nimble: Use Nimble to express the expected outcomes of Swift or Objective-C expressions. Inspired by Cedar. \/\/ Swift expect(1 + 1).to(equal(2)) expect(1.2).to(beCloseTo(1.1, within: 0.1)) expect(3) > 2 expect(\"seahorse\").to(contain(\"sea\")) expect([\"Atlantic\", \"Pacific\"]).toNot(contain(\"Mississippi\")) expect(ocean.isClean).toEventually(beTruthy()) BDD has never felt right to me, but I do like using a layer on top of XCTest&rsquo;s macros because they are both verbose [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[54,74,71,901,268],"class_list":["post-12878","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-objective-c","tag-opensource","tag-programming","tag-swift-programming-language","tag-testing"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12878","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=12878"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12878\/revisions"}],"predecessor-version":[{"id":12879,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12878\/revisions\/12879"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=12878"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=12878"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=12878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}