Finalizing move to rspec 2.0.0 (rake wasn't working)
This commit is contained in:
parent
dad386d8c9
commit
51918548b1
19
Rakefile
19
Rakefile
|
@ -5,7 +5,8 @@ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
||||||
require 'couchrest_model'
|
require 'couchrest_model'
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'spec/rake/spectask'
|
require 'rspec'
|
||||||
|
require 'rspec/core/rake_task'
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
puts <<-EOS
|
puts <<-EOS
|
||||||
To use rspec for testing you must install rspec gem:
|
To use rspec for testing you must install rspec gem:
|
||||||
|
@ -28,8 +29,8 @@ begin
|
||||||
gemspec.has_rdoc = true
|
gemspec.has_rdoc = true
|
||||||
gemspec.add_dependency("couchrest", ">= 1.0.0")
|
gemspec.add_dependency("couchrest", ">= 1.0.0")
|
||||||
gemspec.add_dependency("mime-types", ">= 1.15")
|
gemspec.add_dependency("mime-types", ">= 1.15")
|
||||||
gemspec.add_dependency("activesupport", ">= 2.3.5")
|
gemspec.add_dependency("activesupport", ">= 3.0.0.rc")
|
||||||
gemspec.add_dependency("activemodel", ">= 3.0.0.beta4")
|
gemspec.add_dependency("activemodel", ">= 3.0.0.rc")
|
||||||
gemspec.add_dependency("tzinfo", ">= 0.3.22")
|
gemspec.add_dependency("tzinfo", ">= 0.3.22")
|
||||||
gemspec.add_development_dependency('rspec', '>= 2.0.0.beta.19')
|
gemspec.add_development_dependency('rspec', '>= 2.0.0.beta.19')
|
||||||
gemspec.version = CouchRest::Model::VERSION
|
gemspec.version = CouchRest::Model::VERSION
|
||||||
|
@ -41,15 +42,15 @@ rescue LoadError
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Run all specs"
|
desc "Run all specs"
|
||||||
Spec::Rake::SpecTask.new('spec') do |t|
|
Rspec::Core::RakeTask.new(:spec) do |spec|
|
||||||
t.spec_opts = ["--color"]
|
spec.spec_opts = ["--color"]
|
||||||
t.spec_files = FileList['spec/**/*_spec.rb']
|
spec.pattern = 'spec/**/*_spec.rb'
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Print specdocs"
|
desc "Print specdocs"
|
||||||
Spec::Rake::SpecTask.new(:doc) do |t|
|
Rspec::Core::RakeTask.new(:doc) do |spec|
|
||||||
t.spec_opts = ["--format", "specdoc"]
|
spec.spec_opts = ["--format", "specdoc"]
|
||||||
t.spec_files = FileList['spec/*_spec.rb']
|
spec.pattern = 'spec/*_spec.rb'
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Generate the rdoc"
|
desc "Generate the rdoc"
|
||||||
|
|
|
@ -2,10 +2,7 @@
|
||||||
module CouchRest
|
module CouchRest
|
||||||
module Model
|
module Model
|
||||||
module DesignDoc
|
module DesignDoc
|
||||||
|
extend ActiveSupport::Concern
|
||||||
def self.included(base)
|
|
||||||
base.extend(ClassMethods)
|
|
||||||
end
|
|
||||||
|
|
||||||
module ClassMethods
|
module ClassMethods
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
gem 'couchrest', ">= 1.0.0.beta"
|
gem 'couchrest', ">= 1.0.0"
|
||||||
require 'couchrest'
|
require 'couchrest'
|
||||||
|
|
||||||
gem "tzinfo", ">= 0.3.22"
|
gem "tzinfo", ">= 0.3.22"
|
||||||
|
|
||||||
gem "activesupport", ">= 2.3.5"
|
gem "activesupport", ">= 3.0.0.rc"
|
||||||
require 'active_support/core_ext'
|
require 'active_support/core_ext'
|
||||||
require 'active_support/json'
|
require 'active_support/json'
|
||||||
|
|
||||||
gem "activemodel", ">= 3.0.0.beta4"
|
gem "activemodel", ">= 3.0.0.rc"
|
||||||
require 'active_model'
|
require 'active_model'
|
||||||
require "active_model/callbacks"
|
require "active_model/callbacks"
|
||||||
require "active_model/conversion"
|
require "active_model/conversion"
|
||||||
|
|
|
@ -210,7 +210,7 @@ describe "Model Base" do
|
||||||
|
|
||||||
describe "a doc with template values (CR::Model spec)" do
|
describe "a doc with template values (CR::Model spec)" do
|
||||||
before(:all) do
|
before(:all) do
|
||||||
WithTemplateAndUniqueID.all.map{|o| o.destroy(true)}
|
WithTemplateAndUniqueID.all.map{|o| o.destroy}
|
||||||
WithTemplateAndUniqueID.database.bulk_delete
|
WithTemplateAndUniqueID.database.bulk_delete
|
||||||
@tmpl = WithTemplateAndUniqueID.new
|
@tmpl = WithTemplateAndUniqueID.new
|
||||||
@tmpl2 = WithTemplateAndUniqueID.new(:preset => 'not_value', 'important-field' => '1')
|
@tmpl2 = WithTemplateAndUniqueID.new(:preset => 'not_value', 'important-field' => '1')
|
||||||
|
@ -233,7 +233,7 @@ describe "Model Base" do
|
||||||
describe "finding all instances of a model" do
|
describe "finding all instances of a model" do
|
||||||
before(:all) do
|
before(:all) do
|
||||||
WithTemplateAndUniqueID.req_design_doc_refresh
|
WithTemplateAndUniqueID.req_design_doc_refresh
|
||||||
WithTemplateAndUniqueID.all.map{|o| o.destroy(true)}
|
WithTemplateAndUniqueID.all.map{|o| o.destroy}
|
||||||
WithTemplateAndUniqueID.database.bulk_delete
|
WithTemplateAndUniqueID.database.bulk_delete
|
||||||
WithTemplateAndUniqueID.new('important-field' => '1').save
|
WithTemplateAndUniqueID.new('important-field' => '1').save
|
||||||
WithTemplateAndUniqueID.new('important-field' => '2').save
|
WithTemplateAndUniqueID.new('important-field' => '2').save
|
||||||
|
|
Loading…
Reference in a new issue