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

Add spec for List #24

Merged
merged 2 commits into from
Jan 27, 2024
Merged

Add spec for List #24

merged 2 commits into from
Jan 27, 2024

Conversation

AI-Mozi
Copy link
Member

@AI-Mozi AI-Mozi commented Jan 25, 2024

#1

Copy link
Member

@postmodern postmodern left a comment

Choose a reason for hiding this comment

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

One minor thing.

expect(subject.wordlist_dir).to receive(:list).with(no_args).and_return(wordlists)
expect {
subject.run
}.to output(" wordlist1\n wordlist2\n wordlist3\n").to_stdout
Copy link
Member

Choose a reason for hiding this comment

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

To make the specs more cross-platform, just in case someone runs them on Windows (which uses \r\n instead of \n), I tend to write multi-line Strings as either a heredoc or [ ... ].join($/).

.to output(
  <<~OUTPUT
      wordlist1
      wordlist2
      wordlist3
  OUTPUT
)
.to output(
  [
    "  wordlist1",
    "  wordlist2",
    "  wordlist3",
    ""
  ].join($/)
)

@postmodern postmodern merged commit 12d20fa into ronin-rb:main Jan 27, 2024
6 checks passed
@postmodern postmodern added this to the 0.1.0 milestone Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants