Skip to content

Instantly share code, notes, and snippets.

@joemsak
Last active August 29, 2015 14:07
Show Gist options
  • Save joemsak/8c3d6580b389453668de to your computer and use it in GitHub Desktop.
Save joemsak/8c3d6580b389453668de to your computer and use it in GitHub Desktop.
require 'spec_helper'
class FileStorage
end
RSpec.describe FileStorage do
it 'is empty when no files are uploaded' do
storage = FileStorage.new
expect(storage).to be_empty
end
end
# -------------------------------
# Press ENTER or type command to continue
#
# 1) FileStorage is empty when no files are uploaded
# Failure/Error: expect(storage).to be_empty
# expected #<FileStorage:0x007fe8719718f8> to respond to `empty?`
# # ./spec/models/file_storage_spec.rb:9:in `block (2 levels) in <top (required)>'
# # -e:1:in `<main>'
#
# Finished in 0.01291 seconds (files took 0.16948 seconds to load)
# 1 example, 1 failure
# -------------------------------
require 'spec_helper'
class FileStorage
def empty?
end
end
RSpec.describe FileStorage do
it 'is empty when no files are uploaded' do
storage = FileStorage.new
expect(storage).to be_empty
end
end
# -------------------------------
# Press ENTER or type command to continue
#
# 1) FileStorage is empty when no files are uploaded
# Failure/Error: expect(storage).to be_empty
# expected `#<FileStorage:0x007fe8757a8630>.empty?` to return true, got nil
# # ./spec/models/file_storage_spec.rb:9:in `block (2 levels) in <top (required)>'
# # -e:1:in `<main>'
#
# Finished in 0.01291 seconds (files took 0.16948 seconds to load)
# 1 example, 1 failure
# --------------------------------
require 'spec_helper'
class FileStorage
def empty?
true
end
end
RSpec.describe FileStorage do
it 'is empty when no files are uploaded' do
storage = FileStorage.new
expect(storage).to be_empty
end
end
# -------------------------------
#
# FileStorage
# is empty when no files are uploaded
# Finished in 0.01082 seconds (files took 0.98794 seconds to load)
# 1 example, 0 failures
#
# -------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment