Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Problemns with module classes for rspec testing
~/.rvm/rubies/ruby-1.9.3-p194/bin/ruby -S rspec spec/dm_cloud/media_spec.rb spec/dm_cloud/streaming_spec.rb spec/dm_cloud_spec.rb
~/Projects/dm_cloud/spec/dm_cloud/media_spec.rb:4:in `<top (required)>': uninitialized constant DMCloud (NameError)
# lib/dm_cloud/media.rb
module DMCloud
class Media
def my_method
...
end
end
end
# spec/dm_cloud/media_spec.rb
require 'dm_cloud/media'
describe DMCloud::Media do
context "should get my method" do
it "should return somthing" do
...
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment