Sha256: 6d0ac287433287d2aa556f2b257d85fa0b253a6738ceb556ca71fba2726dfece

Contents?: true

Size: 1.37 KB

Versions: 31

Compression:

Stored size: 1.37 KB

Contents

Feature: Create Directory

  Use the `#create_directory`-method to create a directory within `aruba`'s
  working directory.

  ```ruby
  require 'spec_helper'

  RSpec.configure do |config|
    config.include Aruba::Api
  end

  RSpec.describe 'Create directory' do
    let(:directory) { 'dir.d' }
    before(:each) { create_directory(directory) }

    it { expect(directory).to be_an_existing_directory }
  end
  ```

  Background:
    Given I use a fixture named "cli-app"

  Scenario: New directory
    Given a file named "spec/create_directory_spec.rb" with:
    """ruby
    require 'spec_helper'

    RSpec.describe 'Create directory', :type => :aruba do
      let(:directory) { 'dir.d' }
      before(:each) { create_directory(directory) }

      it { expect(directory).to be_an_existing_directory }
    end
    """
    When I run `rspec`
    Then the specs should all pass

  Scenario: Existing directory

    It does not complain if a directory already exists.

    Given a file named "spec/create_directory_spec.rb" with:
    """ruby
    require 'spec_helper'

    RSpec.describe 'Create directory', :type => :aruba do
      let(:directory) { 'dir.d' }

      before(:each) { create_directory(directory) }
      before(:each) { create_directory(directory) }

      it { expect(directory).to be_an_existing_directory }
    end
    """
    When I run `rspec`
    Then the specs should all pass

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
aruba-0.11.0.pre4 features/api/filesystem/create_directory.feature
aruba-0.11.0.pre3 features/api/filesystem/create_directory.feature
aruba-0.11.0.pre2 features/api/filesystem/create_directory.feature
aruba-0.11.0.pre features/api/filesystem/create_directory.feature
aruba-0.10.2 features/api/filesystem/create_directory.feature
aruba-0.10.1 features/api/filesystem/create_directory.feature
aruba-0.10.0 features/api/filesystem/create_directory.feature
aruba-0.10.0.pre2 features/api/filesystem/create_directory.feature
aruba-0.10.0.pre features/api/filesystem/create_directory.feature
aruba-0.9.0 features/api/filesystem/create_directory.feature
aruba-0.9.0.pre2 features/api/filesystem/create_directory.feature