Skip to content

Instantly share code, notes, and snippets.

@luislavena
Created January 16, 2010 00:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luislavena/278537 to your computer and use it in GitHub Desktop.
Save luislavena/278537 to your computer and use it in GitHub Desktop.
calling s.rb with spec
$stdout.redirected? true
showing s output
Foo
should pass
should be pending (PENDING: Not Yet Implemented)
should fail (FAILED - 1)
Pending:
Foo should be pending (Not Yet Implemented)
C:/Users/Luis/Projects/oss/win32console/s.rb:8:in `block in <top (required)>'
1)
'Foo should fail' FAILED
expected not: == 0,
got: 0
C:/Users/Luis/Projects/oss/win32console/s.rb:11:in `block (2 levels) in <top (required)>'
Finished in 0.018001 seconds
3 examples, 1 failure, 1 pending
STDERR.puts "$stdout.redirected? #{$stdout.redirected?}" if $stdout.respond_to?(:redirected?)
describe "Foo" do
it "should pass" do
0.should == 0
end
it "should be pending"
it "should fail" do
0.should_not == 0
end
end
require 'win32/Console/ANSI'
puts "calling s.rb with spec"
r = `spec --colour -fn s.rb`
puts "showing s output"
puts r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment