Created
September 4, 2015 19:54
-
-
Save grosscol/89e6cf22f0a99049d2d9 to your computer and use it in GitHub Desktop.
Rubocop & Rspec headache with testing a module
This file contains hidden or 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
# I either end up with a rubocop error or an rspec error. In each case, the travis build will not pass. | |
# Rubocop error: | |
# RSpec/DescribedClass: Use described_class instead of Hydra::Works::GenericFile::Characterization | |
describe Hydra::Works::GenericFile::Characterization do | |
let(:demo_class) do | |
Class.new(Hydra::Works::GenericFile::Base) do | |
include Hydra::Works::GenericFile::Characterization | |
end | |
end | |
end | |
# RSpec error: | |
#Failure/Error: include described_class | |
# NameError: | |
# undefined local variable or method `described_class' for #<Class:0x007f30ff496718> | |
describe Hydra::Works::GenericFile::Characterization do | |
let(:demo_class) do | |
Class.new(Hydra::Works::GenericFile::Base) do | |
include described_class | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment