-
-
Save jamesmartin/819341 to your computer and use it in GitHub Desktop.
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
module RadioChannels | |
def self.get_data(url) | |
# Some code | |
end | |
def mixed_in_method(url) | |
RadioChannels.get_data(url) | |
end | |
end | |
class Example | |
include RadioChannels | |
def call_mixed_in_method(arg) | |
mixed_in_method(arg) | |
end | |
end | |
describe "setting expectations on a Module's pseudo-self methods" do | |
before do | |
RadioChannels.should_receive(:get_data).with('foo') | |
end | |
it "calls 'pseudo-module-self' methods via a mixed in method" do | |
example = Example.new | |
example.mixed_in_method('foo') | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment