Skip to content

Instantly share code, notes, and snippets.

@andyh
Forked from junderhill/sms_spec.rb
Last active August 29, 2015 14:07
Show Gist options
  • Save andyh/c6c936553e0f574e6170 to your computer and use it in GitHub Desktop.
Save andyh/c6c936553e0f574e6170 to your computer and use it in GitHub Desktop.
describe SMS do
let(:mock_clockwork_api){ double{"ClockworkApi"} }
subject { SMS.new(:mock_clockwork_api) }
context ".build" do
it "should call messages.build" do
allow(mock_clockwork_api).to receive_message_chain("messages.build") { "method response" }
expect(mock_clockwork_api.messages.build).to eq("method response")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment