<commit_before># This is still work in progress, but will be released as a gem soon

# Spreewald

Spreewald is a collection of useful steps for cucumber. Feel free to fork.

## Installation

Add this line to your application's Gemfile:

    gem 'spreewald'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install spreewald

## Usage

Steps are grouped into a number of categories. You can pick and choose single categories by putting something like
    require 'spreewald/email_steps'
into your `support/env.rb`

Alternatively, you can require everything by doing
    require 'spreewald/all_steps'

## Steps

For a complete list of steps you have to take a look at the step definitions themselves. This is just a rough overview.

### email_steps

Check for the existance of an email with

    Then an email should have been sent with:
        """
        From: <EMAIL>
        To: <EMAIL>
        Subject: Unter anderem der Betreff kann auch "Anführungszeichen" enthalten
        Body: ...
        Attachments: ...
        """

You can obviously skip lines.

After you have used that step, you can also check for content with

    And that mail should have the following lines in the body:
      """
      Jede dieser Text-Zeilen
      muss irgendwo im Body vorhanden sein
      """

### table_steps

Check the content of tables in your HTML.

See [this article](https://makandracards.com/makandra/763-cucumber-step-to-match-table-rows-with-capybara) for details.


### timecop_steps

Steps to travel through time using [TimeCop](https://github.com/jtrupiano/timecop).

See [this article](https://makandracards.com/makandra/1222-useful-cucumber-steps-to-travel-through-time-with-timecop) for details.

### util_steps

Some utility steps and transforms. Supports

* `Then debugger`
* `Then it should work`       (marks step as pending)
* `@slow-motion` (waits 2 seconds after each step)
* `@single-step` (waits for keyboard input after each step)

### web_steps

Most of cucumber-rails' original websteps plus some of our own.

Note that cucumber-rails deprecated those a while ago (you can see the original deprecation notice at the top of [our web_steps](/makandra/spreewald/blob/master/lib/spreewald/web_steps.rb)). Make up your own mind whether you want to use them or not.<commit_msg>add links to files in README<commit_after># This is still work in progress, but will be released as a gem soon

# Spreewald

Spreewald is a collection of useful steps for cucumber. Feel free to fork.

## Installation

Add this line to your application's Gemfile:

    gem 'spreewald'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install spreewald

## Usage

Steps are grouped into a number of categories. You can pick and choose single categories by putting something like
    require 'spreewald/email_steps'
into your `support/env.rb`

Alternatively, you can require everything by doing
    require 'spreewald/all_steps'

## Steps

For a complete list of steps you have to take a look at the step definitions themselves. This is just a rough overview.

### [email_steps](/makandra/spreewald/blob/master/lib/spreewald/email_steps.rb)

Check for the existance of an email with

    Then an email should have been sent with:
        """
        From: <EMAIL>
        To: <EMAIL>
        Subject: Unter anderem der Betreff kann auch "Anführungszeichen" enthalten
        Body: ...
        Attachments: ...
        """

You can obviously skip lines.

After you have used that step, you can also check for content with

    And that mail should have the following lines in the body:
      """
      Jede dieser Text-Zeilen
      muss irgendwo im Body vorhanden sein
      """

### [table_steps](/makandra/spreewald/blob/master/lib/spreewald/table_steps.rb)

Check the content of tables in your HTML.

See [this article](https://makandracards.com/makandra/763-cucumber-step-to-match-table-rows-with-capybara) for details.


### [timecop_steps](/makandra/spreewald/blob/master/lib/spreewald/timecop_steps.rb)

Steps to travel through time using [Timecop](https://github.com/jtrupiano/timecop).

See [this article](https://makandracards.com/makandra/1222-useful-cucumber-steps-to-travel-through-time-with-timecop) for details.

### [util_steps](/makandra/spreewald/blob/master/lib/spreewald/util_steps.rb)

Some utility steps and transforms. Supports

* `Then debugger`
* `Then it should work`       (marks step as pending)
* `@slow-motion` (waits 2 seconds after each step)
* `@single-step` (waits for keyboard input after each step)

### [web_steps](/makandra/spreewald/blob/master/lib/spreewald/web_steps.rb)

Most of cucumber-rails' original websteps plus some of our own.

Note that cucumber-rails deprecated those a while ago (you can see the original deprecation notice at the top of [our web_steps](/makandra/spreewald/blob/master/lib/spreewald/web_steps.rb)). Make up your own mind whether you want to use them or not.
{'fraction_non_alphanumeric': 0.08430818878580072, 'fraction_numerical': 0.003227107704719645, 'mean_word_length': 3.5747232472324724, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7330433', 'n_tokens_mistral': 1536, 'n_tokens_neox': 1472, 'n_words': 570}