Skip to content

Instantly share code, notes, and snippets.

@sj26
Created September 29, 2015 04:49
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 sj26/1eda2c6eba31f67728b2 to your computer and use it in GitHub Desktop.
Save sj26/1eda2c6eba31f67728b2 to your computer and use it in GitHub Desktop.
require "rspec/autorun"
require "rspec/mocks"
require "active_support/all"
RSpec.describe "presence" do
specify { expect(spy).to be_present }
end
#
# Failures:
#
# 1) presence should be present
# Failure/Error: specify { expect(spy).to be_present }
# expected `#<RSpec::Mocks::Double:0x3fd2f63395b0 @name=nil>.present?` to return true, got false
# # weirdness.rb:6:in `block (2 levels) in <main>'
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment