Sha256: ed21c62b32363f13b92a54000b9b18400543312808a0f74c2eef06c2d9e86cc5

Contents?: true

Size: 723 Bytes

Versions: 11

Compression:

Stored size: 723 Bytes

Contents

require File.join(File.dirname(__FILE__), 'test_helper')

describe "WebCore" do
  it "#get with no options" do
    request = mock { expects(:request).with({}) }
    Commands::WebCore::Get.expects(:new).with('blah.com').returns(request)
    Commands::WebCore.get 'blah.com'
  end

  it "#post with no options" do
    Net::HTTP.expects(:post_form).with(anything, {}).returns(nil)
    Commands::WebCore.post 'blah.com'
  end

  it "#build_url with string params" do
    Commands::WebCore.build_url('ababd.com', :q=>'search').should == 'ababd.com?q=search'
  end

  it "#build_url with array params" do
    Commands::WebCore.build_url('ababd.com', :q=>%w{multi word search}).should == 'ababd.com?q=multi+word+search'
  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
boson-more-0.2.1 test/web_test.rb
boson-more-0.2.0 test/web_test.rb
boson-more-0.1.0 test/web_test.rb
boson-0.4.0 test/commands_test.rb
bosonson-0.304.3 test/commands_test.rb
bosonson-0.304.2 test/commands_test.rb
bosonson-0.304.1 test/commands_test.rb
boson-0.3.4 test/commands_test.rb
boson-0.3.3 test/commands_test.rb
boson-0.3.2 test/commands_test.rb
boson-0.3.1 test/commands_test.rb