diff options
Diffstat (limited to 'activeresource/test/fixtures')
-rw-r--r-- | activeresource/test/fixtures/address.rb | 19 | ||||
-rw-r--r-- | activeresource/test/fixtures/beast.rb | 14 | ||||
-rw-r--r-- | activeresource/test/fixtures/customer.rb | 3 | ||||
-rw-r--r-- | activeresource/test/fixtures/person.rb | 3 | ||||
-rw-r--r-- | activeresource/test/fixtures/project.rb | 18 | ||||
-rw-r--r-- | activeresource/test/fixtures/proxy.rb | 4 | ||||
-rw-r--r-- | activeresource/test/fixtures/sound.rb | 9 | ||||
-rw-r--r-- | activeresource/test/fixtures/street_address.rb | 4 | ||||
-rw-r--r-- | activeresource/test/fixtures/subscription_plan.rb | 5 |
9 files changed, 0 insertions, 79 deletions
diff --git a/activeresource/test/fixtures/address.rb b/activeresource/test/fixtures/address.rb deleted file mode 100644 index 7a73ecb52a..0000000000 --- a/activeresource/test/fixtures/address.rb +++ /dev/null @@ -1,19 +0,0 @@ -# turns everything into the same object -class AddressXMLFormatter - include ActiveResource::Formats::XmlFormat - - def decode(xml) - data = ActiveResource::Formats::XmlFormat.decode(xml) - # process address fields - data.each do |address| - address['city_state'] = "#{address['city']}, #{address['state']}" - end - data - end - -end - -class AddressResource < ActiveResource::Base - self.element_name = "address" - self.format = AddressXMLFormatter.new -end
\ No newline at end of file diff --git a/activeresource/test/fixtures/beast.rb b/activeresource/test/fixtures/beast.rb deleted file mode 100644 index e31ec58346..0000000000 --- a/activeresource/test/fixtures/beast.rb +++ /dev/null @@ -1,14 +0,0 @@ -class BeastResource < ActiveResource::Base - self.site = 'http://beast.caboo.se' - site.user = 'foo' - site.password = 'bar' -end - -class Forum < BeastResource - # taken from BeastResource - # self.site = 'http://beast.caboo.se' -end - -class Topic < BeastResource - self.site += '/forums/:forum_id' -end diff --git a/activeresource/test/fixtures/customer.rb b/activeresource/test/fixtures/customer.rb deleted file mode 100644 index 845d5d11cb..0000000000 --- a/activeresource/test/fixtures/customer.rb +++ /dev/null @@ -1,3 +0,0 @@ -class Customer < ActiveResource::Base - self.site = "http://37s.sunrise.i:3000" -end diff --git a/activeresource/test/fixtures/person.rb b/activeresource/test/fixtures/person.rb deleted file mode 100644 index e88bb69310..0000000000 --- a/activeresource/test/fixtures/person.rb +++ /dev/null @@ -1,3 +0,0 @@ -class Person < ActiveResource::Base - self.site = "http://37s.sunrise.i:3000" -end diff --git a/activeresource/test/fixtures/project.rb b/activeresource/test/fixtures/project.rb deleted file mode 100644 index 53de666601..0000000000 --- a/activeresource/test/fixtures/project.rb +++ /dev/null @@ -1,18 +0,0 @@ -# used to test validations -class Project < ActiveResource::Base - self.site = "http://37s.sunrise.i:3000" - schema do - string :email - string :name - end - - validates :name, :presence => true - validates :description, :presence => false, :length => {:maximum => 10} - validate :description_greater_than_three_letters - - # to test the validate *callback* works - def description_greater_than_three_letters - errors.add :description, 'must be greater than three letters long' if description.length < 3 unless description.blank? - end -end - diff --git a/activeresource/test/fixtures/proxy.rb b/activeresource/test/fixtures/proxy.rb deleted file mode 100644 index bb8e015df0..0000000000 --- a/activeresource/test/fixtures/proxy.rb +++ /dev/null @@ -1,4 +0,0 @@ -class ProxyResource < ActiveResource::Base - self.site = "http://localhost" - self.proxy = "http://user:password@proxy.local:3000" -end
\ No newline at end of file diff --git a/activeresource/test/fixtures/sound.rb b/activeresource/test/fixtures/sound.rb deleted file mode 100644 index d9d2b99fcd..0000000000 --- a/activeresource/test/fixtures/sound.rb +++ /dev/null @@ -1,9 +0,0 @@ -module Asset - class Sound < ActiveResource::Base - self.site = "http://37s.sunrise.i:3000" - end -end - -# to test namespacing in a module -class Author -end
\ No newline at end of file diff --git a/activeresource/test/fixtures/street_address.rb b/activeresource/test/fixtures/street_address.rb deleted file mode 100644 index 94a86702b0..0000000000 --- a/activeresource/test/fixtures/street_address.rb +++ /dev/null @@ -1,4 +0,0 @@ -class StreetAddress < ActiveResource::Base - self.site = "http://37s.sunrise.i:3000/people/:person_id/" - self.element_name = 'address' -end diff --git a/activeresource/test/fixtures/subscription_plan.rb b/activeresource/test/fixtures/subscription_plan.rb deleted file mode 100644 index e3c2dd9a74..0000000000 --- a/activeresource/test/fixtures/subscription_plan.rb +++ /dev/null @@ -1,5 +0,0 @@ -class SubscriptionPlan < ActiveResource::Base - self.site = "http://37s.sunrise.i:3000" - self.element_name = 'plan' - self.primary_key = :code -end |