testing/cucumber/features/dsl.feature in cql-1.4.0 vs testing/cucumber/features/dsl.feature in cql-1.4.1

- old
+ new

@@ -1,25 +1,28 @@ Feature: DSL The cql gem uses a DSL to specify queries on a repository object that holds the models which represent a Cucumber test suite. The DSL can query for any attribute that is available on the underlying models. - Sample usage: - cql_repo.query do - select name, source_line - from features - end + Sample usage: + ```` + cql_repo.query do + select name, source_line + from features + end + ```` Query results are returned as a list of attribute mappings for all of the models found in the repository. The sample query above might return: - [{'name' => 'Feature 1', 'source_line' => 1}, - {'name' => 'Feature 2', 'source_line' => 3}, - {'name' => 'Feature 3', 'source_line' => 10}] + ```` + [{'name' => 'Feature 1', 'source_line' => 1}, + {'name' => 'Feature 2', 'source_line' => 3}, + {'name' => 'Feature 3', 'source_line' => 10}] + ```` - Background: A sample Cucumber suite - Given a directory "test_directory" - And a file "test_directory/test_file_1.feature": + Given a repository to query + And the following feature has been modeled in the repository: """ Feature: A test feature Scenario: Test 1 * some steps @@ -35,10 +38,10 @@ | value | Examples: Second examples | param | | value | """ - And a repository is made from "test_directory" + Scenario: Automatic string conversion Although most times it is unnecessary, using full strings in a query can remove syntactical ambiguity.