DG MS; added subscriber model for ostatus interop

This commit is contained in:
maxwell 2010-07-13 14:32:27 -07:00
parent 0bcbd5b16c
commit 9e93fd072e
2 changed files with 20 additions and 0 deletions

8
app/models/subscriber.rb Normal file
View file

@ -0,0 +1,8 @@
class Subscriber
include MongoMapper::Document
key :url
validates_presence_of :url
end

View file

@ -0,0 +1,12 @@
require File.dirname(__FILE__) + '/../spec_helper'
describe Subscriber do
it 'should require a url' do
n = Subscriber.new
n.valid?.should be false
n.url = "http://clown.com/"
n.valid?.should be true
end
end