Skip to content

Commit

Permalink
Improve scenario for #absolute?
Browse files Browse the repository at this point in the history
  • Loading branch information
mvz committed Jan 2, 2021
1 parent 1f13da9 commit 3896672
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions features/04_aruba_api/filesystem/check_if_path_is_absolute.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,6 @@ Feature: Check if path is absolute

Use the `#absolute?`-method to check if a path is an absolute path.

```ruby
require 'spec_helper'

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

RSpec.describe 'Check if directory or file is absolute' do
let(:path) { '/path/to/file.txt' }

it { expect(absolute?(path)).to be true }
end
```

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

Expand All @@ -24,10 +10,12 @@ Feature: Check if path is absolute
"""ruby
require 'spec_helper'
RSpec.describe 'Check if directory or file is absolute', :type => :aruba do
RSpec.describe 'the absolute? method', :type => :aruba do
let(:path) { '/path/to/file.txt' }
it { expect(absolute?(path)).to be true }
it "returns true for an absolute path" do
expect(absolute?(path)).to be true
end
end
"""
When I run `rspec`
Expand Down

0 comments on commit 3896672

Please sign in to comment.