Sha256: 7c99d1d0d0f447abfd42576eb160aaf8e7a6a8b0ba3f8ab19ba2b4bd1f0508a0
Contents?: true
Size: 1.1 KB
Versions: 3
Compression:
Stored size: 1.1 KB
Contents
require 'spec_helper' SimpleCov.command_name('OutlineExample') unless RUBY_VERSION.to_s < '1.9.0' describe "OutlineExample" do it "knows all of its tags" do feature = CucumberAnalytics::ParsedFeature.new feature.tags = ['@feature_tag'] outline = CucumberAnalytics::ParsedScenarioOutline.new outline.tags = ['@outline_tag'] example = CucumberAnalytics::OutlineExample.new example.tags = ['@example_tag'] outline.parent_element = feature example.parent_element = outline example.all_tags.sort.should == ['@feature_tag', '@outline_tag', '@example_tag'].sort end it 'knows its parent element' do file_path = "#{@default_file_directory}/#{@default_feature_file_name}" File.open(file_path, "w") { |file| file.puts('Feature: Test feature') file.puts(' Scenario Outline: Test outline') file.puts(' Examples: test examples') } file = CucumberAnalytics::ParsedFile.new(file_path) outline = file.feature.tests.first example = outline.examples.first example.parent_element.should equal outline end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cucumber_analytics-0.0.9 | spec/example_spec.rb |
cucumber_analytics-0.0.8 | spec/example_spec.rb |
cucumber_analytics-0.0.7 | spec/example_spec.rb |