Sha256: 2aa2ff8da1f4d9d476d229602d6b92856785761b87fdbd6f689fc6d2fc1ff6d0

Contents?: true

Size: 629 Bytes

Versions: 1

Compression:

Stored size: 629 Bytes

Contents

require 'rubygems'
require 'spec'

$:.unshift(File.dirname(__FILE__) + '/../lib')

require 'couch_potato'

CouchPotato::Config.database_name = 'couch_potato_test'
CouchPotato::Config.database_server = 'http://192.168.1.48:5984/'


class Comment
  include CouchPotato::Persistence

  validates_presence_of :title

  property :title
  belongs_to :commenter
end

def recreate_db
  CouchPotato.couchrest_database.delete! rescue nil
  CouchPotato.couchrest_database.server.create_db CouchPotato::Config.database_name
end
recreate_db

Spec::Matchers.define :string_matching do |regex|
  match do |string|
    string =~ regex
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
thefool808-couch_potato-0.2.7 spec/spec_helper.rb