Skip to content

Instantly share code, notes, and snippets.

@mheadd
Last active November 13, 2025 16:02
Show Gist options
  • Select an option

  • Save mheadd/ca95104a4255e8c52fa5ee362fcf7286 to your computer and use it in GitHub Desktop.

Select an option

Save mheadd/ca95104a4255e8c52fa5ee362fcf7286 to your computer and use it in GitHub Desktop.
Comparing similarities and differences between BDD tests and SpecOps specifications

A sample BDD test written in Gherkin

Given applicant income is $15,000
And household size is 3
When eligibility is determined
Then status should be "eligible"
And benefit amount should be $450

A sample from A SpecOps software specification

## Income-Based Eligibility Rule

Households with income below 130% of Federal Poverty Level 
are eligible for benefits. This threshold was established by 
the 2008 Farm Bill and applies to gross monthly income.

The calculation uses household size to determine the applicable 
poverty level, which is updated annually by HHS. The 130% threshold 
specifically reflects Congressional intent to provide assistance to 
the "working poor" who earn above poverty line but still struggle 
with basic needs.

Special cases:
- Self-employment income uses net rather than gross
- Student income has different disregards per 7 CFR 273.5
- Elderly/disabled households use 200% threshold per same regulation

Historical note: Prior to 2008, threshold was 125%. The increase 
was intended to expand coverage during the recession.

Both the test and the specification have value, but they serve different purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment