made all the specs run on 1.9.2, yay :)
This commit is contained in:
parent
d1d8da513c
commit
a17df45fc3
|
@ -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
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require File.dirname(__FILE__) + '/../../spec_helper'
|
require File.expand_path("../../../spec_helper", __FILE__)
|
||||||
|
|
||||||
describe CouchRest do
|
describe CouchRest do
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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')
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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')
|
||||||
|
|
||||||
|
|
|
@ -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')
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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')
|
||||||
|
|
Loading…
Reference in a new issue