Created
November 20, 2012 17:13
-
-
Save elentras/4119328 to your computer and use it in GitHub Desktop.
Problemns with module classes for rspec testing
This file contains 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
~/.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) |
This file contains 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
# lib/dm_cloud/media.rb | |
module DMCloud | |
class Media | |
def my_method | |
... | |
end | |
end | |
end |
This file contains 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
# 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