0.0
No release in over a year
RspecBddStyle provides a collection of methods following the BDD (Behavior-Driven Development) style to enhance clarity and readability in your RSpec specifications. These methods, such as given_i, when_i, and_i, and then_i, simplify the writing of scenarios and actions in your tests. It makes it easier to write more expressive and understandable specifications for your development team.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

RspecBddStyle

RspecBddStyle is a Ruby gem that provides a set of utilities to enhance readability in RSpec BDD-style specifications.

Installation

Add this line to your application's Gemfile:

group :test do
  gem 'rspec-bdd-style'
end

And then execute:

bundle install

Usage

To use RspecBddStyle in your RSpec tests, simply require the module. For example, in your spec/rails_helper.rb or spec/spec_helper.rb:

require 'rspec_bdd_style'

Now you can use the BDD-style methods in your tests:

it '...' do
  given_i_am_fabian_show
  when_i_invite_rosalia_to_dance
  then_she_revolea_upside_down
end

it '...' do
  given_i_am_fabian_show
  when_i_am_dancing
  and_i_invite_rosalia_to_dance
  then_she_revolea_upside_down
end

private 

def i_am_fabian_show
  ...
end

def i_invite_rosalia_to_dance
  ...
end

def i_am_dancing
  ...
end

def she_revolea_upside_down
  ...
end