cfoundry 1.1.0.rc3 → 1.1.0.rc4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/cfoundry/v2/route.rb
CHANGED
data/lib/cfoundry/version.rb
CHANGED
@@ -260,10 +260,11 @@ describe CFoundry::V2::Model do
|
|
260
260
|
end
|
261
261
|
|
262
262
|
describe "creating a new object" do
|
263
|
+
let(:new_object) {
|
264
|
+
client.fake_model_with_attribute
|
265
|
+
}
|
266
|
+
|
263
267
|
describe "getting attributes" do
|
264
|
-
let(:new_object) {
|
265
|
-
client.fake_model_with_attribute
|
266
|
-
}
|
267
268
|
|
268
269
|
it "does not go to cloud controller" do
|
269
270
|
expect {
|
@@ -276,9 +277,18 @@ describe CFoundry::V2::Model do
|
|
276
277
|
new_object.time.should == "now"
|
277
278
|
end
|
278
279
|
end
|
280
|
+
|
281
|
+
describe "getting associations" do
|
282
|
+
describe "to_one associations" do
|
283
|
+
it "returns the an empty object of the association's type" do
|
284
|
+
new_object.domain.guid.should be_nil
|
285
|
+
end
|
286
|
+
end
|
287
|
+
end
|
279
288
|
end
|
280
289
|
end
|
281
290
|
|
282
291
|
class FakeModelWithAttribute < CFoundry::V2::FakeModel
|
283
292
|
attribute :time, :string
|
293
|
+
to_one :domain
|
284
294
|
end
|
@@ -3,10 +3,11 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
module CFoundry::V2
|
5
5
|
describe Route do
|
6
|
-
subject { Route.new(nil,
|
6
|
+
subject { Route.new(nil, fake_client) }
|
7
7
|
|
8
8
|
describe "validations" do
|
9
9
|
it { should validate_presence_of(:domain) }
|
10
|
+
it { should validate_presence_of(:space) }
|
10
11
|
|
11
12
|
# http://tools.ietf.org/html/rfc1035
|
12
13
|
it "only allows host names according to RFC1035" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfoundry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.0.
|
4
|
+
version: 1.1.0.rc4
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -390,7 +390,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
390
390
|
version: '0'
|
391
391
|
segments:
|
392
392
|
- 0
|
393
|
-
hash:
|
393
|
+
hash: -2709231256773334971
|
394
394
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
395
395
|
none: false
|
396
396
|
requirements:
|