made all the specs run on 1.9.2, yay :)
This commit is contained in:
parent
d1d8da513c
commit
a17df45fc3
15 changed files with 23 additions and 17 deletions
|
@ -1,4 +1,5 @@
|
|||
require File.join(File.dirname(__FILE__), '..', 'mixins', 'properties')
|
||||
require File.expand_path('../../mixins/properties', __FILE__)
|
||||
|
||||
|
||||
module CouchRest
|
||||
module CastedModel
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.dirname(__FILE__) + '/../../spec_helper'
|
||||
require File.expand_path("../../../spec_helper", __FILE__)
|
||||
|
||||
describe CouchRest do
|
||||
|
||||
|
|
|
@ -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,7 +263,11 @@ describe CouchRest::Database do
|
|||
r['ok'].should == true
|
||||
doc = @db.get("attach-this")
|
||||
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
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.dirname(__FILE__) + '/../../spec_helper'
|
||||
require File.expand_path("../../../spec_helper", __FILE__)
|
||||
|
||||
describe CouchRest::Design do
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.dirname(__FILE__) + '/../../spec_helper'
|
||||
require File.expand_path("../../../spec_helper", __FILE__)
|
||||
|
||||
class Video < CouchRest::Document; end
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.dirname(__FILE__) + '/../../spec_helper'
|
||||
require File.expand_path("../../../spec_helper", __FILE__)
|
||||
|
||||
describe CouchRest::Server do
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.dirname(__FILE__) + '/../../spec_helper'
|
||||
require File.expand_path("../../../spec_helper", __FILE__)
|
||||
|
||||
describe CouchRest::Pager do
|
||||
before(:all) do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.dirname(__FILE__) + '/../../spec_helper'
|
||||
require File.expand_path("../../../spec_helper", __FILE__)
|
||||
|
||||
describe CouchRest::Streamer do
|
||||
before(:all) do
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.dirname(__FILE__) + '/../../spec_helper'
|
||||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
|
||||
describe "ExtendedDocument attachments" do
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
@ -354,7 +354,8 @@ describe "ExtendedDocument views" do
|
|||
a = Article.new(:title => title, :date => Date.today)
|
||||
a.save
|
||||
end
|
||||
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
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue