Adding Homebrew Support to XCFit Framework

Glad to announce that XCFit is available to download from Homebrew package manager. XCFit  a.k.a (XCUICucumberish and Fitnesse Integrations Tests) is a full stack Xcode BDD framework for Swift iOS apps. XCFit creates automated Xcode templates which helps us to setup BDD style tests within Xcode. You can read more about XCFit on my previous post or articles published on DZone here .

Homebrew

Just in case, if you have not heard of Homebrew, it’s package manager fro macOS. We can install almost everything using Homebrew including macOS free apps. Homebrew can be installed on any macOS using a command.

Now that, we are ready to use Homebrew. We can install package as core Homebrew or using HomeBrew caskroom like this

e.g We can install ‘Google Chrome” using following command.

Now , we will see how to install XCFit using Homebrew.

XCFit Installation Methods

As mentioned in the previous posts, XCFit has been installed using RubyGems. Actually, It’s very hard to maintaining the Ruby versions and Gem versions.

Using RubyGems – Current Method

XCFit is available on RubyGems, you can see it on Gem server here. We can install XcFit using system Ruby preinstalls on Mac.

Or If you are experienced Ruby user, you can use ‘Gemfile’ and Bundler to manage XCFit. Just add it your ‘Gemfile’

At this stage, we can install bundle and start using xcfit.

This will print all the commands available to XCFit.

Using HomeBrew – New/Recommended  Method

It’s true that managing dependencies using RubyGems is very hard as Ruby versions are changing all the time. Also it’s learning curve for the new Ruby user. It will be quick to install XCFit using lightweight package manager like Homebrew. If you have already installed XCFit using Rubygems then uninstall it first to avoid any confusion.

Now XCFit can be installed using simple command without any hassle.

This will print all the available commands with XCFit.

homebrew

Now that, you can have all XCFit commands available to use. The main command which setup BDD Style Xcode template is

Enjoy XCFit with Homebrew !