Sha256: a7f6e9e10f325112818c0522bcc4d9e8d60e6ea6395ff0f5e2a8c2ec5be60f63
Contents?: true
Size: 900 Bytes
Versions: 4
Compression:
Stored size: 900 Bytes
Contents
require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper") include CanControlsGateway describe CanControlsGateway::RcaCommand do it "should find the class" do CanControlsGateway::RcaCommand.should_not == nil end it "should init form c'tor args" do rca = RcaCommand.new( "http://localhost:4042/commands", 'input_dispatcher', {'action' => 'confirm'} ) rca.target.should == 'input_dispatcher' rca.rci_uri.should == 'http://localhost:4042/commands' rca.arguments.should == 'action%3Dconfirm' end describe "with a rca command" do before :each do @rca = RcaCommand.new "http://localhost:4042/commands", 'input_dispatcher' end it "should prepare commmand args" do args = {"foo" => "bar", "fnord" => "hukl"} @rca.send(:prepare_command_arguments, args). should == "fnord%3Dhukl%26foo%3Dbar" end end end
Version data entries
4 entries across 4 versions & 1 rubygems