linode 0.7.10 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,50 +6,52 @@ describe Linode::Domain do
6
6
  @api_key = 'foo'
7
7
  @linode = Linode::Domain.new(:api_key => @api_key)
8
8
  end
9
-
9
+
10
10
  it 'should be a Linode instance' do
11
11
  @linode.class.should < Linode
12
12
  end
13
-
13
+
14
14
  %w(update create list delete).each do |action|
15
15
  it "should allow accessing the #{action} API" do
16
16
  @linode.should respond_to(action.to_sym)
17
17
  end
18
-
18
+
19
19
  describe "when accessing the #{action} API" do
20
20
  it 'should allow a data hash' do
21
- lambda { @linode.send(action.to_sym, {}) }.should_not raise_error(ArgumentError)
21
+ @linode.stubs(:send_request)
22
+ lambda { @linode.send(action.to_sym, {}) }.should_not raise_error
22
23
  end
23
-
24
+
24
25
  it 'should not require arguments' do
25
- lambda { @linode.send(action.to_sym) }.should_not raise_error(ArgumentError)
26
+ @linode.stubs(:send_request)
27
+ lambda { @linode.send(action.to_sym) }.should_not raise_error
26
28
  end
27
-
29
+
28
30
  it "should request the domain.#{action} action" do
29
31
  @linode.expects(:send_request).with {|api_action, data| api_action == "domain.#{action}" }
30
32
  @linode.send(action.to_sym)
31
33
  end
32
-
34
+
33
35
  it 'should provide the data hash when making its request' do
34
36
  @linode.expects(:send_request).with {|api_action, data| data = { :foo => :bar } }
35
37
  @linode.send(action.to_sym, {:foo => :bar})
36
38
  end
37
-
39
+
38
40
  it 'should return the result of the request' do
39
- @linode.expects(:send_request).returns(:bar => :baz)
40
- @linode.send(action.to_sym).should == { :bar => :baz }
41
+ @linode.expects(:send_request).returns(:bar => :baz)
42
+ @linode.send(action.to_sym).should == { :bar => :baz }
41
43
  end
42
-
43
- it "should consider the documentation to live at http://www.linode.com/api/dns/domain.#{action}" do
44
- @linode.documentation_path(Linode.action_path(@linode.class.name, action)).should == "http://www.linode.com/api/dns/domain.#{action}"
44
+
45
+ it "should consider the documentation to live at https://www.linode.com/api/dns/domain.#{action}" do
46
+ @linode.documentation_path(Linode.action_path(@linode.class.name, action)).should == "https://www.linode.com/api/dns/domain.#{action}"
45
47
  end
46
48
  end
47
49
  end
48
-
50
+
49
51
  it 'should be able to provide access to the Linode Domain Resource API' do
50
52
  @linode.should respond_to(:resource)
51
53
  end
52
-
54
+
53
55
  describe 'when providing access to the Linode Domain Resource API' do
54
56
  before :each do
55
57
  @api_key = 'foo'
@@ -58,25 +60,25 @@ describe Linode::Domain do
58
60
  end
59
61
 
60
62
  it 'should allow no arguments' do
61
- lambda { @linode.resource }.should_not raise_error(ArgumentError)
63
+ lambda { @linode.resource }.should_not raise_error
62
64
  end
63
-
65
+
64
66
  it 'should require no arguments' do
65
67
  lambda { @linode.resource(:foo) }.should raise_error(ArgumentError)
66
68
  end
67
-
69
+
68
70
  it 'should return a Linode::Domain::Resource instance' do
69
71
  @linode.resource.class.should == Linode::Domain::Resource
70
72
  end
71
-
73
+
72
74
  it 'should set the API key on the Linode::Domain::Resource instance to be our API key' do
73
75
  @linode.resource.api_key.should == @api_key
74
76
  end
75
-
77
+
76
78
  it 'should set the API url on the Linode::Domain::Resource instance to be our API url' do
77
79
  @linode.resource.api_url.should == @api_url
78
80
  end
79
-
81
+
80
82
  it 'should return the same Linode::Domain::Resource instance when called again' do
81
83
  linode = Linode::Domain.new(:api_key => @api_key)
82
84
  result = linode.resource
@@ -0,0 +1,50 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper.rb')
2
+ require 'linode'
3
+
4
+ describe Linode::Image do
5
+ before :each do
6
+ @api_key = 'foo'
7
+ @linode = Linode::Image.new(:api_key => @api_key)
8
+ end
9
+
10
+ it 'should be a Linode instance' do
11
+ @linode.class.should < Linode
12
+ end
13
+
14
+ %w(list delete).each do |action|
15
+ it "should allow accessing the #{action} API" do
16
+ @linode.should respond_to(action.to_sym)
17
+ end
18
+
19
+ describe "when accessing the #{action} API" do
20
+ it 'should allow a data hash' do
21
+ @linode.stubs(:send_request)
22
+ lambda { @linode.send(action.to_sym, {}) }.should_not raise_error
23
+ end
24
+
25
+ it 'should not require arguments' do
26
+ @linode.stubs(:send_request)
27
+ lambda { @linode.send(action.to_sym) }.should_not raise_error
28
+ end
29
+
30
+ it "should request the image.#{action} action" do
31
+ @linode.expects(:send_request).with {|api_action, data| api_action == "image.#{action}" }
32
+ @linode.send(action.to_sym)
33
+ end
34
+
35
+ it 'should provide the data hash when making its request' do
36
+ @linode.expects(:send_request).with {|api_action, data| data = { :foo => :bar } }
37
+ @linode.send(action.to_sym, {:foo => :bar})
38
+ end
39
+
40
+ it 'should return the result of the request' do
41
+ @linode.expects(:send_request).returns(:bar => :baz)
42
+ @linode.send(action.to_sym).should == { :bar => :baz }
43
+ end
44
+
45
+ it "should consider the documentation to live at https://www.linode.com/api/image/image.#{action}" do
46
+ @linode.documentation_path(Linode.action_path(@linode.class.name, action)).should == "https://www.linode.com/api/image/image.#{action}"
47
+ end
48
+ end
49
+ end
50
+ end
@@ -6,42 +6,44 @@ describe Linode::Linode::Config do
6
6
  @api_key = 'foo'
7
7
  @linode = Linode::Linode::Config.new(:api_key => @api_key)
8
8
  end
9
-
9
+
10
10
  it 'should be a Linode instance' do
11
11
  @linode.class.should < Linode
12
12
  end
13
-
13
+
14
14
  %w(update create list delete).each do |action|
15
15
  it "should allow accessing the #{action} API" do
16
16
  @linode.should respond_to(action.to_sym)
17
17
  end
18
-
18
+
19
19
  describe "when accessing the #{action} API" do
20
20
  it 'should allow a data hash' do
21
- lambda { @linode.send(action.to_sym, {}) }.should_not raise_error(ArgumentError)
21
+ @linode.stubs(:send_request)
22
+ lambda { @linode.send(action.to_sym, {}) }.should_not raise_error
22
23
  end
23
-
24
+
24
25
  it 'should not require arguments' do
25
- lambda { @linode.send(action.to_sym) }.should_not raise_error(ArgumentError)
26
+ @linode.stubs(:send_request)
27
+ lambda { @linode.send(action.to_sym) }.should_not raise_error
26
28
  end
27
-
29
+
28
30
  it "should request the avail.#{action} action" do
29
31
  @linode.expects(:send_request).with {|api_action, data| api_action == "linode.config.#{action}" }
30
32
  @linode.send(action.to_sym)
31
33
  end
32
-
34
+
33
35
  it 'should provide the data hash when making its request' do
34
36
  @linode.expects(:send_request).with {|api_action, data| data = { :foo => :bar } }
35
37
  @linode.send(action.to_sym, {:foo => :bar})
36
38
  end
37
-
39
+
38
40
  it 'should return the result of the request' do
39
- @linode.expects(:send_request).returns(:bar => :baz)
40
- @linode.send(action.to_sym).should == { :bar => :baz }
41
+ @linode.expects(:send_request).returns(:bar => :baz)
42
+ @linode.send(action.to_sym).should == { :bar => :baz }
41
43
  end
42
-
43
- it "should consider the documentation to live at http://www.linode.com/api/linode/linode.config.#{action}" do
44
- @linode.documentation_path(Linode.action_path(@linode.class.name, action)).should == "http://www.linode.com/api/linode/linode.config.#{action}"
44
+
45
+ it "should consider the documentation to live at https://www.linode.com/api/linode/linode.config.#{action}" do
46
+ @linode.documentation_path(Linode.action_path(@linode.class.name, action)).should == "https://www.linode.com/api/linode/linode.config.#{action}"
45
47
  end
46
48
  end
47
49
  end
@@ -6,46 +6,48 @@ describe Linode::Linode::Disk do
6
6
  @api_key = 'foo'
7
7
  @linode = Linode::Linode::Disk.new(:api_key => @api_key)
8
8
  end
9
-
9
+
10
10
  it 'should be a Linode instance' do
11
11
  @linode.class.should < Linode
12
12
  end
13
-
14
- %w(update create list createfromdistribution createfromstackscript duplicate delete resize).each do |action|
13
+
14
+ %w(update create list createfromdistribution createfromimage createfromstackscript duplicate delete resize imagize).each do |action|
15
15
  it "should allow accessing the #{action} API" do
16
16
  @linode.should respond_to(action.to_sym)
17
17
  end
18
-
18
+
19
19
  describe "when accessing the #{action} API" do
20
20
  it 'should allow a data hash' do
21
- lambda { @linode.send(action.to_sym, {}) }.should_not raise_error(ArgumentError)
21
+ @linode.stubs(:send_request)
22
+ lambda { @linode.send(action.to_sym, {}) }.should_not raise_error
22
23
  end
23
-
24
+
24
25
  it 'should not require arguments' do
25
- lambda { @linode.send(action.to_sym) }.should_not raise_error(ArgumentError)
26
+ @linode.stubs(:send_request)
27
+ lambda { @linode.send(action.to_sym) }.should_not raise_error
26
28
  end
27
-
29
+
28
30
  it "should request the avail.#{action} action" do
29
31
  @linode.expects(:send_request).with {|api_action, data| api_action == "linode.disk.#{action}" }
30
32
  @linode.send(action.to_sym)
31
33
  end
32
-
34
+
33
35
  it 'should provide the data hash when making its request' do
34
36
  @linode.expects(:send_request).with {|api_action, data| data = { :foo => :bar } }
35
37
  @linode.send(action.to_sym, {:foo => :bar})
36
38
  end
37
-
39
+
38
40
  it 'should return the result of the request' do
39
- @linode.expects(:send_request).returns(:bar => :baz)
40
- @linode.send(action.to_sym).should == { :bar => :baz }
41
+ @linode.expects(:send_request).returns(:bar => :baz)
42
+ @linode.send(action.to_sym).should == { :bar => :baz }
41
43
  end
42
-
43
- it "should consider the documentation to live at http://www.linode.com/api/linode/linode.disk.#{action}" do
44
- @linode.documentation_path(Linode.action_path(@linode.class.name, action)).should == "http://www.linode.com/api/linode/linode.disk.#{action}"
44
+
45
+ it "should consider the documentation to live at https://www.linode.com/api/linode/linode.disk.#{action}" do
46
+ @linode.documentation_path(Linode.action_path(@linode.class.name, action)).should == "https://www.linode.com/api/linode/linode.disk.#{action}"
45
47
  end
46
48
  end
47
49
  end
48
-
50
+
49
51
  it 'should allow retrieving the disk type from disks in the "list" results' do
50
52
  @linode.stubs(:post).returns('DATA' => { 'TYPE' => 'foo' })
51
53
  @linode.list.type.should == 'foo'
@@ -6,42 +6,44 @@ describe Linode::Linode::Ip do
6
6
  @api_key = 'foo'
7
7
  @linode = Linode::Linode::Ip.new(:api_key => @api_key)
8
8
  end
9
-
9
+
10
10
  it 'should be a Linode instance' do
11
11
  @linode.class.should < Linode
12
12
  end
13
-
14
- %w(list addprivate).each do |action|
13
+
14
+ %w(list addprivate addpublic setrdns swap).each do |action|
15
15
  it "should allow accessing the #{action} API" do
16
16
  @linode.should respond_to(action.to_sym)
17
17
  end
18
-
18
+
19
19
  describe "when accessing the #{action} API" do
20
20
  it 'should allow a data hash' do
21
- lambda { @linode.send(action.to_sym, {}) }.should_not raise_error(ArgumentError)
21
+ @linode.stubs(:send_request)
22
+ lambda { @linode.send(action.to_sym, {}) }.should_not raise_error
22
23
  end
23
-
24
+
24
25
  it 'should not require arguments' do
25
- lambda { @linode.send(action.to_sym) }.should_not raise_error(ArgumentError)
26
+ @linode.stubs(:send_request)
27
+ lambda { @linode.send(action.to_sym) }.should_not raise_error
26
28
  end
27
-
29
+
28
30
  it "should request the avail.#{action} action" do
29
31
  @linode.expects(:send_request).with {|api_action, data| api_action == "linode.ip.#{action}" }
30
32
  @linode.send(action.to_sym)
31
33
  end
32
-
34
+
33
35
  it 'should provide the data hash when making its request' do
34
36
  @linode.expects(:send_request).with {|api_action, data| data = { :foo => :bar } }
35
37
  @linode.send(action.to_sym, {:foo => :bar})
36
38
  end
37
-
39
+
38
40
  it 'should return the result of the request' do
39
- @linode.expects(:send_request).returns(:bar => :baz)
40
- @linode.send(action.to_sym).should == { :bar => :baz }
41
+ @linode.expects(:send_request).returns(:bar => :baz)
42
+ @linode.send(action.to_sym).should == { :bar => :baz }
41
43
  end
42
-
43
- it "should consider the documentation to live at http://www.linode.com/api/linode/linode.ip.#{action}" do
44
- @linode.documentation_path(Linode.action_path(@linode.class.name, action)).should == "http://www.linode.com/api/linode/linode.ip.#{action}"
44
+
45
+ it "should consider the documentation to live at https://www.linode.com/api/linode/linode.ip.#{action}" do
46
+ @linode.documentation_path(Linode.action_path(@linode.class.name, action)).should == "https://www.linode.com/api/linode/linode.ip.#{action}"
45
47
  end
46
48
  end
47
49
  end
@@ -6,42 +6,44 @@ describe Linode::Linode::Job do
6
6
  @api_key = 'foo'
7
7
  @linode = Linode::Linode::Job.new(:api_key => @api_key)
8
8
  end
9
-
9
+
10
10
  it 'should be a Linode instance' do
11
11
  @linode.class.should < Linode
12
12
  end
13
-
13
+
14
14
  %w(list).each do |action|
15
15
  it "should allow accessing the #{action} API" do
16
16
  @linode.should respond_to(action.to_sym)
17
17
  end
18
-
18
+
19
19
  describe "when accessing the #{action} API" do
20
20
  it 'should allow a data hash' do
21
- lambda { @linode.send(action.to_sym, {}) }.should_not raise_error(ArgumentError)
21
+ @linode.stubs(:send_request)
22
+ lambda { @linode.send(action.to_sym, {}) }.should_not raise_error
22
23
  end
23
-
24
+
24
25
  it 'should not require arguments' do
25
- lambda { @linode.send(action.to_sym) }.should_not raise_error(ArgumentError)
26
+ @linode.stubs(:send_request)
27
+ lambda { @linode.send(action.to_sym) }.should_not raise_error
26
28
  end
27
-
29
+
28
30
  it "should request the avail.#{action} action" do
29
31
  @linode.expects(:send_request).with {|api_action, data| api_action == "linode.job.#{action}" }
30
32
  @linode.send(action.to_sym)
31
33
  end
32
-
34
+
33
35
  it 'should provide the data hash when making its request' do
34
36
  @linode.expects(:send_request).with {|api_action, data| data = { :foo => :bar } }
35
37
  @linode.send(action.to_sym, {:foo => :bar})
36
38
  end
37
-
39
+
38
40
  it 'should return the result of the request' do
39
- @linode.expects(:send_request).returns(:bar => :baz)
40
- @linode.send(action.to_sym).should == { :bar => :baz }
41
+ @linode.expects(:send_request).returns(:bar => :baz)
42
+ @linode.send(action.to_sym).should == { :bar => :baz }
41
43
  end
42
-
43
- it "should consider the documentation to live at http://www.linode.com/api/linode/linode.job.#{action}" do
44
- @linode.documentation_path(Linode.action_path(@linode.class.name, action)).should == "http://www.linode.com/api/linode/linode.job.#{action}"
44
+
45
+ it "should consider the documentation to live at https://www.linode.com/api/linode/linode.job.#{action}" do
46
+ @linode.documentation_path(Linode.action_path(@linode.class.name, action)).should == "https://www.linode.com/api/linode/linode.job.#{action}"
45
47
  end
46
48
  end
47
49
  end
@@ -6,50 +6,52 @@ describe Linode::Linode do
6
6
  @api_key = 'foo'
7
7
  @linode = Linode::Linode.new(:api_key => @api_key)
8
8
  end
9
-
9
+
10
10
  it 'should be a Linode instance' do
11
11
  @linode.class.should < Linode
12
12
  end
13
-
14
- %w(update create list shutdown boot delete reboot).each do |action|
13
+
14
+ %w(update create list shutdown boot delete reboot clone resize).each do |action|
15
15
  it "should allow accessing the #{action} API" do
16
16
  @linode.should respond_to(action.to_sym)
17
17
  end
18
-
18
+
19
19
  describe "when accessing the #{action} API" do
20
20
  it 'should allow a data hash' do
21
- lambda { @linode.send(action.to_sym, {}) }.should_not raise_error(ArgumentError)
21
+ @linode.stubs(:send_request)
22
+ lambda { @linode.send(action.to_sym, {}) }.should_not raise_error
22
23
  end
23
-
24
+
24
25
  it 'should not require arguments' do
25
- lambda { @linode.send(action.to_sym) }.should_not raise_error(ArgumentError)
26
+ @linode.stubs(:send_request)
27
+ lambda { @linode.send(action.to_sym) }.should_not raise_error
26
28
  end
27
-
29
+
28
30
  it "should request the linode.#{action} action" do
29
31
  @linode.expects(:send_request).with {|api_action, data| api_action == "linode.#{action}" }
30
32
  @linode.send(action.to_sym)
31
33
  end
32
-
34
+
33
35
  it 'should provide the data hash when making its request' do
34
36
  @linode.expects(:send_request).with {|api_action, data| data = { :foo => :bar } }
35
37
  @linode.send(action.to_sym, {:foo => :bar})
36
38
  end
37
-
39
+
38
40
  it 'should return the result of the request' do
39
- @linode.expects(:send_request).returns(:bar => :baz)
40
- @linode.send(action.to_sym).should == { :bar => :baz }
41
+ @linode.expects(:send_request).returns(:bar => :baz)
42
+ @linode.send(action.to_sym).should == { :bar => :baz }
41
43
  end
42
-
43
- it "should consider the documentation to live at http://www.linode.com/api/linode/linode.#{action}" do
44
- @linode.documentation_path(Linode.action_path(@linode.class.name, action)).should == "http://www.linode.com/api/linode/linode.#{action}"
44
+
45
+ it "should consider the documentation to live at https://www.linode.com/api/linode/linode.#{action}" do
46
+ @linode.documentation_path(Linode.action_path(@linode.class.name, action)).should == "https://www.linode.com/api/linode/linode.#{action}"
45
47
  end
46
48
  end
47
49
  end
48
-
50
+
49
51
  it 'should be able to provide access to the Linode Config API' do
50
52
  @linode.should respond_to(:config)
51
53
  end
52
-
54
+
53
55
  describe 'when providing access to the Linode Config API' do
54
56
  before :each do
55
57
  @api_key = 'foo'
@@ -58,25 +60,25 @@ describe Linode::Linode do
58
60
  end
59
61
 
60
62
  it 'should allow no arguments' do
61
- lambda { @linode.config }.should_not raise_error(ArgumentError)
63
+ lambda { @linode.config }.should_not raise_error
62
64
  end
63
-
65
+
64
66
  it 'should require no arguments' do
65
67
  lambda { @linode.config(:foo) }.should raise_error(ArgumentError)
66
68
  end
67
-
69
+
68
70
  it 'should return a Linode::Linode::Config instance' do
69
71
  @linode.config.class.should == Linode::Linode::Config
70
72
  end
71
-
73
+
72
74
  it 'should set the API key on the Linode::Linode::Config instance to be our API key' do
73
75
  @linode.config.api_key.should == @api_key
74
76
  end
75
-
77
+
76
78
  it 'should set the API url on the Linode::Linode::Config instance to be our API url' do
77
79
  @linode.config.api_url.should == @api_url
78
80
  end
79
-
81
+
80
82
  it 'should return the same Linode::Linode::Config instance when called again' do
81
83
  linode = Linode::Linode.new(:api_key => @api_key)
82
84
  result = linode.config
@@ -87,7 +89,7 @@ describe Linode::Linode do
87
89
  it 'should be able to provide access to the Linode Disk API' do
88
90
  @linode.should respond_to(:disk)
89
91
  end
90
-
92
+
91
93
  describe 'when providing access to the Linode Disk API' do
92
94
  before :each do
93
95
  @api_key = 'foo'
@@ -96,36 +98,36 @@ describe Linode::Linode do
96
98
  end
97
99
 
98
100
  it 'should allow no arguments' do
99
- lambda { @linode.disk }.should_not raise_error(ArgumentError)
101
+ lambda { @linode.disk }.should_not raise_error
100
102
  end
101
-
103
+
102
104
  it 'should require no arguments' do
103
105
  lambda { @linode.disk(:foo) }.should raise_error(ArgumentError)
104
106
  end
105
-
107
+
106
108
  it 'should return a Linode::Linode::Disk instance' do
107
109
  @linode.disk.class.should == Linode::Linode::Disk
108
110
  end
109
-
111
+
110
112
  it 'should set the API key on the Linode::Linode::Disk instance to be our API key' do
111
113
  @linode.disk.api_key.should == @api_key
112
114
  end
113
-
115
+
114
116
  it 'should set the API url on the Linode::Linode::Disk instance to be our API url' do
115
117
  @linode.disk.api_url.should == @api_url
116
118
  end
117
-
119
+
118
120
  it 'should return the same Linode::Linode::Disk instance when called again' do
119
121
  linode = Linode::Linode.new(:api_key => @api_key)
120
122
  result = linode.disk
121
123
  linode.disk.should == result
122
124
  end
123
125
  end
124
-
126
+
125
127
  it 'should be able to provide access to the Linode Job API' do
126
128
  @linode.should respond_to(:job)
127
129
  end
128
-
130
+
129
131
  describe 'when providing access to the Linode Job API' do
130
132
  before :each do
131
133
  @api_key = 'foo'
@@ -134,36 +136,36 @@ describe Linode::Linode do
134
136
  end
135
137
 
136
138
  it 'should allow no arguments' do
137
- lambda { @linode.job }.should_not raise_error(ArgumentError)
139
+ lambda { @linode.job }.should_not raise_error
138
140
  end
139
-
141
+
140
142
  it 'should require no arguments' do
141
143
  lambda { @linode.job(:foo) }.should raise_error(ArgumentError)
142
144
  end
143
-
145
+
144
146
  it 'should return a Linode::Linode::Job instance' do
145
147
  @linode.job.class.should == Linode::Linode::Job
146
148
  end
147
-
149
+
148
150
  it 'should set the API key on the Linode::Linode::Job instance to be our API key' do
149
151
  @linode.job.api_key.should == @api_key
150
152
  end
151
-
153
+
152
154
  it 'should set the API url on the Linode::Linode::Job instance to be our API url' do
153
155
  @linode.job.api_url.should == @api_url
154
156
  end
155
-
157
+
156
158
  it 'should return the same Linode::Linode::Job instance when called again' do
157
159
  linode = Linode::Linode.new(:api_key => @api_key)
158
160
  result = linode.job
159
161
  linode.job.should == result
160
162
  end
161
163
  end
162
-
164
+
163
165
  it 'should be able to provide access to the Linode Ip API' do
164
166
  @linode.should respond_to(:ip)
165
167
  end
166
-
168
+
167
169
  describe 'when providing access to the Linode Ip API' do
168
170
  before :each do
169
171
  @api_key = 'foo'
@@ -172,25 +174,25 @@ describe Linode::Linode do
172
174
  end
173
175
 
174
176
  it 'should allow no arguments' do
175
- lambda { @linode.ip }.should_not raise_error(ArgumentError)
177
+ lambda { @linode.ip }.should_not raise_error
176
178
  end
177
-
179
+
178
180
  it 'should require no arguments' do
179
181
  lambda { @linode.ip(:foo) }.should raise_error(ArgumentError)
180
182
  end
181
-
183
+
182
184
  it 'should return a Linode::Linode::Ip instance' do
183
185
  @linode.ip.class.should == Linode::Linode::Ip
184
186
  end
185
-
187
+
186
188
  it 'should set the API key on the Linode::Linode::Ip instance to be our API key' do
187
189
  @linode.ip.api_key.should == @api_key
188
190
  end
189
-
191
+
190
192
  it 'should set the API url on the Linode::Linode::Ip instance to be our API url' do
191
193
  @linode.ip.api_url.should == @api_url
192
194
  end
193
-
195
+
194
196
  it 'should return the same Linode::Linode::Linode instance when called again' do
195
197
  linode = Linode::Linode.new(:api_key => @api_key)
196
198
  result = linode.ip