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 CouchRest
module CastedModel module CastedModel

View file

@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../../spec_helper' require File.expand_path("../../../spec_helper", __FILE__)
describe CouchRest do 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 describe CouchRest::Database do
before(:each) do before(:each) do
@ -263,7 +263,11 @@ describe CouchRest::Database do
r['ok'].should == true r['ok'].should == true
doc = @db.get("attach-this") doc = @db.get("attach-this")
attachment = @db.fetch_attachment(doc,"couchdb.png") attachment = @db.fetch_attachment(doc,"couchdb.png")
attachment.should == image if attachment.respond_to?(:net_http_res)
attachment.net_http_res.body.should == image
else
attachment.should == image
end
end end
end end

View file

@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../../spec_helper' require File.expand_path("../../../spec_helper", __FILE__)
describe CouchRest::Design do 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 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 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 describe CouchRest::Pager do
before(:all) 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 describe CouchRest::Streamer do
before(:all) 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') require File.join(FIXTURE_PATH, 'more', 'card')
class Car < CouchRest::ExtendedDocument class Car < CouchRest::ExtendedDocument

View file

@ -1,6 +1,6 @@
# encoding: utf-8 # 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', 'card')
require File.join(FIXTURE_PATH, 'more', 'cat') require File.join(FIXTURE_PATH, 'more', 'cat')
require File.join(FIXTURE_PATH, 'more', 'person') 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 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', 'article')
require File.join(FIXTURE_PATH, 'more', 'course') 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', 'card')
require File.join(FIXTURE_PATH, 'more', 'course') 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', 'article')
require File.join(FIXTURE_PATH, 'more', 'course') require File.join(FIXTURE_PATH, 'more', 'course')
@ -354,7 +354,8 @@ describe "ExtendedDocument views" do
a = Article.new(:title => title, :date => Date.today) a = Article.new(:title => title, :date => Date.today)
a.save a.save
end end
end end
require 'date'
it "should return a proxy that looks like an array of 7 Article objects" do it "should return a proxy that looks like an array of 7 Article objects" do
articles = Article.by_date :key => Date.today articles = Article.by_date :key => Date.today
articles.class.should == Array 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', 'person')
require File.join(FIXTURE_PATH, 'more', 'card') require File.join(FIXTURE_PATH, 'more', 'card')
require File.join(FIXTURE_PATH, 'more', 'invoice') require File.join(FIXTURE_PATH, 'more', 'invoice')