Sha256: df62de2112fb1237125aecf2bb1b1f441e2b016bc337f8325d5d98cc4dc42ef9

Contents?: true

Size: 567 Bytes

Versions: 9

Compression:

Stored size: 567 Bytes

Contents

require 'rubygems'
require 'spec'

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

require 'couch_potato'

CouchPotato::Config.database_name = 'couch_potato_test'


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

9 entries across 9 versions & 2 rubygems

Version Path
langalex-couch_potato-0.2.0 spec/spec_helper.rb
langalex-couch_potato-0.2.1 spec/spec_helper.rb
langalex-couch_potato-0.2.2 spec/spec_helper.rb
langalex-couch_potato-0.2.3 spec/spec_helper.rb
langalex-couch_potato-0.2.4 spec/spec_helper.rb
langalex-couch_potato-0.2.5 spec/spec_helper.rb
langalex-couch_potato-0.2.6 spec/spec_helper.rb
speedmax-couch_potato-0.2.0 spec/spec_helper.rb
speedmax-couch_potato-0.2.2 spec/spec_helper.rb