File: tc_curl_easy_setopt.rb

package info (click to toggle)
ruby-curb 0.8.6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 604 kB
  • ctags: 880
  • sloc: ansic: 4,242; ruby: 2,768; makefile: 3
file content (31 lines) | stat: -rw-r--r-- 554 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))

class TestCurbCurlEasySetOpt < Test::Unit::TestCase
  def setup
    @easy = Curl::Easy.new
  end

  def test_opt_verbose
    @easy.set :verbose, true
    assert @easy.verbose?
  end

  def test_opt_header
    @easy.set :header, true
  end

  def test_opt_noprogress
    @easy.set :noprogress, true
  end

  def test_opt_nosignal
    @easy.set :nosignal, true
  end

  def test_opt_url
    url = "http://google.com/"
    @easy.set :url, url
    assert_equal url, @easy.url
  end

end