Sha256: a94d240c4415d43fa17f54b104408acd75eaa66894f2dd021a07219cf84a7cf6

Contents?: true

Size: 856 Bytes

Versions: 6

Compression:

Stored size: 856 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'

describe Culerity::RemoteBrowserProxy do
  it "should send the serialized method call to the output" do
    io = stub 'io', :gets => '[return, :okay]'
    io.should_receive(:<<).with("[\"browser\", \"goto\", \"/homepage\"]\n")
    proxy = Culerity::RemoteBrowserProxy.new io
    proxy.goto '/homepage'
  end
  
  it "should return the deserialized return value" do
    io = stub 'io', :gets => "[:return, :okay]\n", :<< => nil
    proxy = Culerity::RemoteBrowserProxy.new io
    proxy.goto.should == :okay
  end
  
  it "should send the brower options to the remote server" do
    io = stub 'io', :gets => "[:return, :okay]"
    io.should_receive(:<<).with('["celerity", "configure_browser", {:browser=>:firefox}]' + "\n")
    proxy = Culerity::RemoteBrowserProxy.new io, {:browser => :firefox}
  end
  
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
caius-culerity-0.1.5 spec/remote_browser_proxy_spec.rb
caius-culerity-0.1.6 spec/remote_browser_proxy_spec.rb
langalex-culerity-0.1.2 spec/remote_browser_proxy_spec.rb
langalex-culerity-0.1.3 spec/remote_browser_proxy_spec.rb
langalex-culerity-0.1.4 spec/remote_browser_proxy_spec.rb
langalex-culerity-0.1.5 spec/remote_browser_proxy_spec.rb