Last active
June 8, 2016 15:38
-
-
Save jrochkind/04725b9f864d0cdedd7c8a7474cdd183 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rspec' | |
require 'rspec/autorun' | |
describe "foo" do | |
around do |example| | |
puts "This is before #{example.description}" | |
example.run | |
puts "This is after #{example.description}" | |
end | |
it "passes" do | |
expect(true).to be true | |
end | |
it "raises" do | |
raise "uh oh!" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$ ruby test.rb
This is before passes
This is after passes
.This is before raises
This is after raises
F
Failures:
Failure/Error: raise "uh oh!"
Finished in 0.0019 seconds (files took 0.14316 seconds to load)
2 examples, 1 failure
Failed examples:
rspec test.rb:17 # foo raises