Skip to content
This repository

Spec outputting to stderr #318

Merged
merged 1 commit into from about 1 year ago

2 participants

Justin Campbell Erik Michaels-Ober
Justin Campbell

The test on line 128 in group_spec is outputting to stderr. I added a capture for it, but this is probably not the expected behavior. Probably introduced in c1665b3. /cc @JoshCheek

Erik Michaels-Ober sferik merged commit f8c4c7a into from April 08, 2013
Erik Michaels-Ober sferik closed this April 08, 2013
Erik Michaels-Ober
Owner

Thanks Justin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Mar 28, 2013
Justin Campbell Capture stderr, add spec for matching error 0458a46
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 7 additions and 1 deletion. Show diff stats Hide diff stats

  1. 8  spec/group_spec.rb
8  spec/group_spec.rb
@@ -126,8 +126,14 @@
126 126
       end
127 127
 
128 128
       it "allows to invoke a class from the class binding by the given option" do
129  
-        content = capture(:stdout) { G.start(["--invoked", "e"]) }
  129
+        error = nil
  130
+        content = capture(:stdout) {
  131
+          error = capture(:stderr) {
  132
+            G.start(["--invoked", "e"])
  133
+          }
  134
+        }
130 135
         expect(content).to match(/invoke  e/)
  136
+        expect(error).to match(/ERROR: thor two was called with arguments/)
131 137
       end
132 138
 
133 139
       it "shows invocation information to the user" do
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.