Sha256: 5c26d7cc12a9321c279db87ec8b9af697449ac7360134e0777a57b7f1ffdbe75

Contents?: true

Size: 626 Bytes

Versions: 6

Compression:

Stored size: 626 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://127.0.0.1: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

6 entries across 6 versions & 2 rubygems

Version Path
andrewtimberlake-couch_potato-0.2.8.1 spec/spec_helper.rb
andrewtimberlake-couch_potato-0.2.8.2 spec/spec_helper.rb
andrewtimberlake-couch_potato-0.2.8.3 spec/spec_helper.rb
andrewtimberlake-couch_potato-0.2.8.4 spec/spec_helper.rb
langalex-couch_potato-0.2.7 spec/spec_helper.rb
langalex-couch_potato-0.2.8 spec/spec_helper.rb