davedevelopment/montserrat

CLI extension for Behat

Installs: 116

Dependents: 1

Suggesters: 0

Security: 0

Stars: 3

Watchers: 2

Forks: 0

Open Issues: 0

Type:behat-extension

dev-master 2012-07-04 10:00 UTC

This package is auto-updated.

Last update: 2024-04-06 09:54:44 UTC


README

Build Status

What is it?

Montserrat is to Behat what Aruba is to Cucumber. It's an extension for Command line applications written in any programming language. I'll be trying to add as much of aruba's functionality as I can on an ongoing basis.

Installation

The only documented way to install montserrat is with composer

$ composer.phar require --dev davedevelopment/montserrat:* 

Usage

Add the extension to your behat.yml file:

default:
    extensions:
        Behat\Montserrat\Extension:

In your FeatureContext constructor, add montserrat as a context (traits coming soon):

<?php
    public function __construct(array $parameters)
    {
        $this->useContext('montserrat', new Behat\Montserrat\Context\MontserratContext());
    }

Write your features:

Feature: ls
    In order to examine files in directory
    As a terminal user
    I need to list the files

    Scenario: ls shows files
        Given an empty file named "foo/bar"
        When I run `ls foo`
        Then the output should contain "bar"

To see a full list of available steps, see the features, or use behat's -dl switch:

$ vendor/bin/behat -dl

Contributing

Fork it, branch it, check Aruba to see how they do it, implement it and pull request for great good.

Copyright

Copyright (c) 2012 Dave Marshall. See LICENCE for further details