{"id":17003838,"url":"https://github.com/cldwalker/bahia","last_synced_at":"2025-03-17T09:31:01.267Z","repository":{"id":2025956,"uuid":"2962212","full_name":"cldwalker/bahia","owner":"cldwalker","description":"commandline acceptance testing - aruba for non-cucumber test frameworks","archived":false,"fork":false,"pushed_at":"2012-04-09T05:36:30.000Z","size":146,"stargazers_count":51,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T06:46:48.886Z","etag":null,"topics":[],"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/cldwalker.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rdoc","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-12-12T05:48:40.000Z","updated_at":"2024-10-19T18:22:22.000Z","dependencies_parsed_at":"2022-08-27T10:52:31.692Z","dependency_job_id":null,"html_url":"https://github.com/cldwalker/bahia","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldwalker%2Fbahia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldwalker%2Fbahia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldwalker%2Fbahia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldwalker%2Fbahia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cldwalker","download_url":"https://codeload.github.com/cldwalker/bahia/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243858929,"owners_count":20359260,"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-10-14T04:32:51.098Z","updated_at":"2025-03-17T09:31:00.982Z","avatar_url":"https://github.com/cldwalker.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Description\n===========\n\nBahia - where commandline acceptance tests are easy, the people are festive and\nonde nasceu capoeira. In other words, aruba for any non-cucumber test framework.\nWorks across rubies on 1.8 and 1.9.\n\nUsage\n=====\n\nSay you want to test your gem's executable, blarg:\n\n    describe \"blarg\" do\n      it \"prints usage without args\" do\n        blarg\n        stdout.should == 'Usage: blarg COMMAND'\n      end\n\n      it 'prints error for double blarging' do\n        blarg \"blarg\"\n        stderr.should == \"Bad human! No double blarging allowed\"\n        process.success?.should == false\n      end\n\n      it \"prints message for quoted args\" do\n        blarg %[please handle 'blarg multiple' \"blarg words\"]\n        stdout.should == \"Why u like quote so much?\"\n        process.success?.should == true\n      end\n    end\n\nAs you can see, bahia provided helpers stdout, stderr and process as well as\nautomatically creates a method to invoke your executable.\n\nSetting it up in your {test,spec}/helper.rb is just a simple include:\n\n    require 'bahia'\n\n    # for rspec\n    Rspec.configure {|c| c.include Bahia }\n\n    # for minitest\n    class MiniTest::Unit::TestCase\n      include Bahia\n    end\n\n    # for bacon\n    class Bacon::Context\n      include Bahia\n    end\n\n    # for your preferred framework\n    include some shit ...\n\nIf the above doesn't automagically work for you, configure Bahia before\nincluding it:\n\n    Bahia.command = 'blarg 3.0'\n    Bahia.command_method = 'not blarg'\n    Bahia.project_directory = '/path/to/gem/root/dir'\n\nAbout\n=====\nBahia uses open3 and is dead simple - so simple that you probably should've read\nthe source instead of this readme. Ha!\n\nEdit: open3 don't work for 1.9 rubies so the joke is on me.\n\nLimitations\n===========\nCan't capture process in jruby yet.\n\nContributing\n============\n[See here](http://tagaholic.me/contributing.html)\n\nCredits\n=======\n\n* @spicycode - initial testing\n* @rsanheim - allow project\\_directory override\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcldwalker%2Fbahia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcldwalker%2Fbahia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcldwalker%2Fbahia/lists"}