Skip to content

The file should contain "regex" #9

Closed
@bryan-ash

Description

There's a good chance that I'm being dense, but the file content matching regular expression steps don't work.

For example:
Scenario: Example
Given a file named "output.txt" with:
"""
1111111
"""
Then the file "output.txt" should contain "1+"

Fails:
Then the file "output.txt" should contain "1+" # 1.8.6-p399/gems/aruba-0.1.9/lib/aruba/cucumber.rb:145
expected "1111111" to match /1+/ (Spec::Expectations::ExpectationNotMetError)
features/counter.feature:25:in `Then the file "output.txt" should contain "1+"'

If I want to match a regular expression, why would I want Aruba to escape the expression I provide?

Would you expect the following scenario to pass?
Scenario: Check file contents
Given a file named "foo" with:
"""
hello world
"""
Then the file "foo" should contain "h.llo world"
And the file "foo" should not contain "HELLO WORLD"

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions