test/helper.rb in roflbot-0.0.5 vs test/helper.rb in roflbot-0.0.6
- old
+ new
@@ -21,17 +21,27 @@
@oauth = stub("OAuth", :authorize_from_access => [])
@twitter = stub("Twitter", :mentions => [])
Twitter::OAuth.stubs(:new).returns(@oauth)
Twitter::Base.stubs(:new).returns(@twitter)
+ @gvoice = stub("Gvoice", :smss => [])
+ GvoiceRuby::Client.stubs(:new).returns(@gvoice)
end
def receive_im(message, auto = false)
@client.on_im_block.call(message, @buddy, auto)
end
def fake_tweet(message, id)
Hashie::Mash.new("user" => { "screen_name" => "dudeguy" }, "text" => "@roflbot #{message}", "id" => id)
+ end
+
+ def fake_sms(message)
+ stub("SMS", {
+ :text => message,
+ :from => "+16158675309",
+ :labels => %w{unread}
+ })
end
def fixture_filename(name)
File.dirname(__FILE__) + "/fixtures/#{name}"
end