Sha256: e97405bf13a5557305ffe6bcab2c479f70ad5a87ededa3ff34f40a480d3a6744

Contents?: true

Size: 1.05 KB

Versions: 4

Compression:

Stored size: 1.05 KB

Contents

require File.dirname(__FILE__) + '/persistable_helper.rb'

# This tests are bullshit really...
# Check if the errors exist and call their message parameters too...
# gives us good rcov coverage...

describe CouchObject::Errors, "errormessages: " do
  it "CantCompareSize" do
    error = CouchObject::Errors::CantCompareSize.new
    error.message.should == "Can't compare the size of two objects unless at least one of them has been saved and both have timestamps."
  end

  it "CantCompareSize" do
    error = CouchObject::Errors::NoDatabaseLocationSet.new
    error.message.should == "Unless the document has previously been saved you need to supply the full URI to the CouchDB server where the document is to be saved."
  end

  it "HasManyAssociationError" do
    error = CouchObject::Errors::HasManyAssociationError.new
    error.message
  end
  it "BelongsToAssociationError" do
    error = CouchObject::Errors::BelongsToAssociationError.new
    error.message
  end
  it "MissingView" do
    error = CouchObject::Errors::MissingView.new
    error.message
  end

end

Version data entries

4 entries across 2 versions & 1 rubygems

Version Path
couchobject-0.6.0 spec/persistable/error_messages.rb
couchobject-0.6.0 spec/persistable/error_messages_spec.rb
couchobject-0.6.1 spec/persistable/error_messages.rb
couchobject-0.6.1 spec/persistable/error_messages_spec.rb