Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/doc/
/lib/
/libs/
/.crystal/
/.shards/
Expand Down
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors:

license: MIT

dependencies:
development_dependencies:
spec2:
github: waterlink/spec2.cr
version: ~> 0.9
2 changes: 1 addition & 1 deletion spec/shell_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Spec2.describe "Shell" do

it "stderr not empty" { expect(subject.stderr).not_to eq "" }
it "stderr contains error message" {
expect(subject.stderr).to match(/command not found/)
expect(subject.stderr).to match(/not found/)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Here, the error message depends on shell. This will relax restrictions and make pass a test on travis-ci.

}
it "stdout is empty" { expect(subject.stdout).to eq "" }

Expand Down
4 changes: 2 additions & 2 deletions src/shell.cr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Shell

def initialize(@cmd : String,
@stdout : Stdio = MemoryIO.new,
@stderr : Stdio = MemoryIO.new,
@stdout : Process::Stdio = IO::Memory.new,
@stderr : Process::Stdio = IO::Memory.new,
@fail_on_error : Bool = true
)
@status = 0
Expand Down