Sha256: 6f4e2b9488e1077e13c6c627710b530c88423c8e08dd79449a2e0365f8f5c118

Contents?: true

Size: 754 Bytes

Versions: 3

Compression:

Stored size: 754 Bytes

Contents

require 'spec_helper'

SimpleCov.command_name('Directory') unless RUBY_VERSION.to_s < '1.9.0'

describe 'Directory, Integration' do

  it 'properly sets its child elements' do
    nested_directory = "#{@default_file_directory}/nested_directory"
    file_path = "#{@default_file_directory}/#{@default_feature_file_name}"

    FileUtils.mkdir(nested_directory)
    File.open(file_path, "w") { |file|
      file.puts('Feature: Test feature')
    }

    directory = CucumberAnalytics::Directory.new(@default_file_directory)
    nested_directory = directory.directories.first
    file = directory.feature_files.first

    nested_directory.parent_element.should equal directory
    file.parent_element.should equal directory
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cucumber_analytics-1.2.0 spec/integration/directory_integration_spec.rb
cucumber_analytics-1.1.1 spec/integration/directory_integration_spec.rb
cucumber_analytics-1.0.0 spec/integration/directory_integration_spec.rb