Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify feature file organization #602

Merged
merged 8 commits into from
Apr 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ Feature: Configure timeout for command execution
config.exit_timeout = 2
end
"""
And the default feature-test
And a file named "features/run.feature" with:
"""
Feature: Run it
Scenario: Fast command
When I run `cli`
Then the exit status should be 0
"""
Then I successfully run `cucumber`

Scenario: Fails if takes longer
Expand All @@ -47,6 +53,12 @@ Feature: Configure timeout for command execution
config.exit_timeout = 1
end
"""
And the default feature-test
And a file named "features/run.feature" with:
"""
Feature: Run it
Scenario: Fast command
When I run `cli`
Then the exit status should be 0
"""
Then I run `cucumber`
And the exit status should be 1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ Feature: Configure working directory of aruba
config.working_directory = 'tmp/cucumber'
end
"""
And the default feature-test
And the default executable
And a file named "features/run.feature" with:
"""
Feature: Run it
Scenario: Fast command
When I run `echo "Hello"`
Then the exit status should be 0
"""
When I successfully run `cucumber`
Then a directory named "tmp/cucumber" should exist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,63 @@ Feature: Check file content
Background:
Given I use a fixture named "cli-app"

Scenario: Check file contents with plain text
Given a file named "features/non-existence.feature" with:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this file called non-existence?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. I copied this feature from master I think.

"""
Feature: Check
Scenario: Check
Given a file named "foo" with:
\"\"\"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these escaped because were inside a """ already? I don't use aruba really.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is the reason. It's a little ugly 😞.

hello world
\"\"\"
Then the file "foo" should contain "hello world"
And the file "foo" should not contain "HELLO WORLD"
"""
When I run `cucumber`
Then the features should all pass

Scenario: Check file contents with regular expression
Given a file named "features/non-existence.feature" with:
"""
Feature: Check
Background:
Given a file named "foo" with:
\"\"\"
hello world
\"\"\"

Scenario: Check #1
Then the file "foo" should match /hel.o world/
And the file "foo" should not match /HELLO WORLD/

Scenario: Check #2
Then the file "foo" should match %r<hel.o world>
And the file "foo" should not match %r<HELLO WORLD>
"""
When I run `cucumber`
Then the features should all pass

Scenario: Check file contents with cucumber doc string
Given a file named "features/non-existence.feature" with:
"""
Feature: Existence
Scenario: Existence
Given a file named "foo" with:
\"\"\"
foo
bar
baz
foobar
\"\"\"
Then the file "foo" should contain:
\"\"\"
bar
baz
\"\"\"
"""
When I run `cucumber`
Then the features should all pass

Scenario: Existing file having content
Given a file named "features/file_content.feature" with:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,3 @@ Feature: Move file or directory
"""
When I run `cucumber`
Then the features should all pass

File renamed without changes.
15 changes: 0 additions & 15 deletions features/development/build.feature

This file was deleted.

38 changes: 0 additions & 38 deletions features/getting_started/writing_good_feature_tests.feature

This file was deleted.

72 changes: 0 additions & 72 deletions features/matchers/collection/include_an_object.feature

This file was deleted.

56 changes: 0 additions & 56 deletions features/step_definitions/aruba_dev_steps.rb

This file was deleted.

61 changes: 0 additions & 61 deletions features/steps/filesystem/check_file_content.feature

This file was deleted.

Loading