Skip to content

Instantly share code, notes, and snippets.

@mvz
Forked from sorah/spec_helper.rb
Last active August 29, 2015 14:05
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 mvz/758a60339a1a1b6902f6 to your computer and use it in GitHub Desktop.
Save mvz/758a60339a1a1b6902f6 to your computer and use it in GitHub Desktop.
RSpec.configure do |config|
config.after(:each) do
next if RSpec::Matchers.last_should
result = self.example.metadata[:execution_result]
next if result[:exception] || result[:pending_message]
next if RSpec::Mocks.space.instance_eval { proxies }.any?
raise "No expectations found in example at #{self.example.location}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment