--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+un...@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/49a5a495-cc57-4906-b69f-b3589319cc7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
In Ruby, if you have a class Foo::Bar definition, it will fail with an error like the one you received if Foo has not already been defined. That’s simply how Ruby works and has nothing to do with RSpec. The solution is to change your class definition to:
module Backup
class Status
# ...
end
end
(Note: that could be class Backup if that’s what you intend it to be.)
Alternately, if you want to keep the class Backup::Status form, you’ll have to require another file that does define the bare Backup class or module. Typically this require would go at the top of your lib/backup/status.rb file.
HTH,
Myron
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/ccc09de7-a485-4ce4-a24c-7c6038df59c4%40googlegroups.com.