Does anybody have any idea how I would make this shorter and less redundant:
Feature: nosql
Scenario: flatfile
Sometimes a user just wants to have flatfile storage like the
classic Jekyll CMS. When this is the case we should make sure
that we adhere to classic folder and file structure, and store
the generated content in _site unless the user decides that
they want generation to be stored inside of memcached, then we
should go ahead and use that.
Given I have chosen flatfile storage for my site
When I request a page, "the_page"
And I have chosen flatfile generation
Then I should pull the page from "_site"
Given I have chosen flatfile storage for my site
When I request a page, "the_page"
And I have chosen memcached generation
Then I should pull the page from memcached
I just see too much repeated text and even though Cucumber is meant to help people communicate it just seems like it’s made things perhaps “too dumb” because of all the repetition in certain types of scenarios? Unless I am missing something.
There is also the other small problem, how would I make one feature have a dependency of another feature? For example memcached itself is a feature so how would I require that feature in this feature so that if memcached is not implemented yet then flatfile scenario fails when it meets memcached storage.
Edit: Also I know that flatfile storage isn’t nosql, I just threw it in there because I haven’t decided which nosql besides Git I want… so it was easier to just throw up flatfile for now so I can start to grasp cucumber for my projects.
You can use a
Background, like this: