fleakr 0.5.2 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +52 -17
- data/lib/fleakr.rb +37 -29
- data/lib/fleakr/api.rb +1 -0
- data/lib/fleakr/api/authentication_request.rb +32 -0
- data/lib/fleakr/api/file_parameter.rb +4 -2
- data/lib/fleakr/api/method_request.rb +11 -12
- data/lib/fleakr/api/parameter_list.rb +75 -48
- data/lib/fleakr/api/upload_request.rb +1 -1
- data/lib/fleakr/api/value_parameter.rb +3 -3
- data/lib/fleakr/objects/authentication_token.rb +4 -0
- data/lib/fleakr/objects/set.rb +24 -0
- data/lib/fleakr/support.rb +2 -1
- data/lib/fleakr/support/object.rb +10 -6
- data/lib/fleakr/support/request.rb +23 -0
- data/lib/fleakr/version.rb +2 -2
- data/test/fixtures/photosets.getInfo.xml +7 -0
- data/test/test_helper.rb +3 -3
- data/test/unit/fleakr/api/authentication_request_test.rb +37 -0
- data/test/unit/fleakr/api/file_parameter_test.rb +0 -5
- data/test/unit/fleakr/api/method_request_test.rb +67 -85
- data/test/unit/fleakr/api/parameter_list_test.rb +116 -97
- data/test/unit/fleakr/api/upload_request_test.rb +5 -15
- data/test/unit/fleakr/objects/authentication_token_test.rb +9 -0
- data/test/unit/fleakr/objects/set_test.rb +30 -1
- data/test/unit/fleakr/support/object_test.rb +12 -6
- data/test/unit/fleakr/support/request_test.rb +42 -0
- data/test/unit/fleakr_test.rb +36 -90
- metadata +7 -4
- data/lib/fleakr/api/parameter.rb +0 -35
- data/test/unit/fleakr/api/parameter_test.rb +0 -34
@@ -1,34 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../../../test_helper'
|
2
|
-
|
3
|
-
module Fleakr::Api
|
4
|
-
class ParameterTest < Test::Unit::TestCase
|
5
|
-
|
6
|
-
context "An instance of the Parameter class" do
|
7
|
-
|
8
|
-
should "have a name" do
|
9
|
-
parameter = Parameter.new('foo')
|
10
|
-
parameter.name.should == 'foo'
|
11
|
-
end
|
12
|
-
|
13
|
-
should "know to include it in the signature by default" do
|
14
|
-
parameter = Parameter.new('foo')
|
15
|
-
parameter.include_in_signature?.should be(true)
|
16
|
-
end
|
17
|
-
|
18
|
-
should "know not to include it in the signature" do
|
19
|
-
parameter = Parameter.new('foo', false)
|
20
|
-
parameter.include_in_signature?.should be(false)
|
21
|
-
end
|
22
|
-
|
23
|
-
should "be able to compare itself to another parameter instance" do
|
24
|
-
p1 = Parameter.new('z', 'a')
|
25
|
-
p2 = Parameter.new('a', 'z')
|
26
|
-
|
27
|
-
(p1 <=> p2).should == 1
|
28
|
-
end
|
29
|
-
|
30
|
-
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
34
|
-
end
|