made all the specs run on 1.9.2, yay :)

This commit is contained in:
Matt Aimonetti 2009-08-01 14:21:18 -07:00
parent d1d8da513c
commit a17df45fc3
15 changed files with 23 additions and 17 deletions

View file

@ -1,4 +1,5 @@
require File.join(File.dirname(__FILE__), '..', 'mixins', 'properties')
require File.expand_path('../../mixins/properties', __FILE__)
module CouchRest
module CastedModel

View file

@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../../spec_helper'
require File.expand_path("../../../spec_helper", __FILE__)
describe CouchRest do

View file

@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../../spec_helper'
require File.expand_path("../../../spec_helper", __FILE__)
describe CouchRest::Database do
before(:each) do
@ -263,9 +263,13 @@ describe CouchRest::Database do
r['ok'].should == true
doc = @db.get("attach-this")
attachment = @db.fetch_attachment(doc,"couchdb.png")
if attachment.respond_to?(:net_http_res)
attachment.net_http_res.body.should == image
else
attachment.should == image
end
end
end
describe "PUT document with attachment" do
before(:each) do

View file

@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../../spec_helper'
require File.expand_path("../../../spec_helper", __FILE__)
describe CouchRest::Design do

View file

@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../../spec_helper'
require File.expand_path("../../../spec_helper", __FILE__)
class Video < CouchRest::Document; end

View file

@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../../spec_helper'
require File.expand_path("../../../spec_helper", __FILE__)
describe CouchRest::Server do

View file

@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../../spec_helper'
require File.expand_path("../../../spec_helper", __FILE__)
describe CouchRest::Pager do
before(:all) do

View file

@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../../spec_helper'
require File.expand_path("../../../spec_helper", __FILE__)
describe CouchRest::Streamer do
before(:all) do

View file

@ -1,4 +1,4 @@
require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
require File.expand_path('../../../spec_helper', __FILE__)
require File.join(FIXTURE_PATH, 'more', 'card')
class Car < CouchRest::ExtendedDocument

View file

@ -1,6 +1,6 @@
# encoding: utf-8
require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
require File.expand_path('../../../spec_helper', __FILE__)
require File.join(FIXTURE_PATH, 'more', 'card')
require File.join(FIXTURE_PATH, 'more', 'cat')
require File.join(FIXTURE_PATH, 'more', 'person')

View file

@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../../spec_helper'
require File.expand_path('../../../spec_helper', __FILE__)
describe "ExtendedDocument attachments" do

View file

@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../../spec_helper'
require File.expand_path("../../../spec_helper", __FILE__)
require File.join(FIXTURE_PATH, 'more', 'article')
require File.join(FIXTURE_PATH, 'more', 'course')

View file

@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../../spec_helper'
require File.expand_path("../../../spec_helper", __FILE__)
require File.join(FIXTURE_PATH, 'more', 'card')
require File.join(FIXTURE_PATH, 'more', 'course')

View file

@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../../spec_helper'
require File.expand_path("../../../spec_helper", __FILE__)
require File.join(FIXTURE_PATH, 'more', 'article')
require File.join(FIXTURE_PATH, 'more', 'course')
@ -355,6 +355,7 @@ describe "ExtendedDocument views" do
a.save
end
end
require 'date'
it "should return a proxy that looks like an array of 7 Article objects" do
articles = Article.by_date :key => Date.today
articles.class.should == Array

View file

@ -1,4 +1,4 @@
require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
require File.expand_path('../../../spec_helper', __FILE__)
require File.join(FIXTURE_PATH, 'more', 'person')
require File.join(FIXTURE_PATH, 'more', 'card')
require File.join(FIXTURE_PATH, 'more', 'invoice')