Class: FlavoredGherkin::HtmlFlavour
- Defined in:
- lib/flavored_gherkin/html_flavour.rb
Overview
Html Flavored Gherkin
Instance Method Summary collapse
-
#build(title, feature_files, output_path) ⇒ Object
Build Html Flavored Gherkin.
Methods inherited from Flavour
Instance Method Details
#build(title, feature_files, output_path) ⇒ Object
Build Html Flavored Gherkin
12 13 14 15 16 17 18 |
# File 'lib/flavored_gherkin/html_flavour.rb', line 12 def build(title, feature_files, output_path) gherkins = get_gherkins feature_files raise "Error:: No valid gherkin feature file found #{feature_files}" if gherkins.empty? File.open("#{output_path}.html", 'w') do |file| file.write get('html_flavour').result(binding).gsub(' ', '').gsub("\n\n", '') end end |