Logo: Relish

  1. Sign in

Project: Cukemodeler 1.0.0

Feature file modeling

Feature file models represent a single .feature file in a test suite. They expose several attributes of the
feature file that they represent, as well as containing the model for the feature that is present in that file.

Background An existing feature file
Given
the directory "test_directory"
And
the file "test_directory/foo.feature":
Feature: Bar
And
the feature file is modeled
  @model = CukeModeler::FeatureFile.new('<path_to>/test_directory/foo.feature')
Scenarios
Modeling a feature files's path
When
the feature file's path is requested
  @model.path
Then
the model returns "path_to/test_directory/foo.feature"
Modeling a feature files's name
When
the feature file's name is requested
  @model.name
Then
the model returns "foo.feature"
Modeling a feature file's feature
When
the feature file's feature is requested
  @model.feature
Then
the model returns a model for the following feature:
Bar

Last published about 5 years ago by Eric Kessler.