To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorCreate Directory
Use the #create_directory
-method to create a directory within aruba
's
working directory.
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"
- Scenarios
-
- New directory
-
- Given
-
a file named "spec/create_directory_spec.rb" with:
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
- Existing directory
-
It does not complain if a directory already exists.
- Given
-
a file named "spec/create_directory_spec.rb" with:
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
Last published over 7 years ago by Max Meyer.