cucumber / cucumber/aruba

Stop including full Aruba API in Cucumber World or RSpec spec class

Open
#694 6 comments 1 reaction 0 assignees View on GitHub
breaking change
Dominant language
Ruby
Stars
966
Forks
162
Avg merge
18h 51m
Merged PRs (30d)
8

Description

## Summary

Aruba exposes a large set of API methods into the test environment. It would be cleaner to access these through a dedicated object.

## Expected Behavior

Something like:

```ruby
it "has some behavior" do
aruba.write_file("foo.txt")
aruba.run_command_and_stop("bar foo.txt")
# ...
end
```

## Current Behavior

```ruby
it "has some behavior" do
write_file("foo.txt")
run_command_and_stop("bar foo.txt")
# ...
end
```

## Possible Solution

This needs to be changed in several steps:

1. Create object that provides these methods.
2. Implement currently exposed methods in terms of this object.
3. Deprecate direct use of exposed methods.
4. Remove exposed methods.

## Context & Motivation

Aruba's API is massive and testing it clearly is difficult because the methods are exposed to Aruba's specs as well. Also, exposing these through a real object makes it clearer for end users to see where the methods they call come from.

Contributor guide

Open the contributing guide

Research direction

Start by locating where Aruba methods are exposed to the Cucumber World and RSpec spec class, then inspect how the currently exposed methods are used in the test environment. Done means a dedicated object provides the API, existing calls are implemented through it, direct use is deprecated, and the exposed methods are eventually removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
testing
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.