Finalizing move to rspec 2.0.0 (rake wasn't working)

This commit is contained in:
Sam Lown 2010-08-18 20:00:03 +02:00
parent dad386d8c9
commit 51918548b1
4 changed files with 16 additions and 18 deletions

View file

@ -5,7 +5,8 @@ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
require 'couchrest_model'
begin
require 'spec/rake/spectask'
require 'rspec'
require 'rspec/core/rake_task'
rescue LoadError
puts <<-EOS
To use rspec for testing you must install rspec gem:
@ -28,8 +29,8 @@ begin
gemspec.has_rdoc = true
gemspec.add_dependency("couchrest", ">= 1.0.0")
gemspec.add_dependency("mime-types", ">= 1.15")
gemspec.add_dependency("activesupport", ">= 2.3.5")
gemspec.add_dependency("activemodel", ">= 3.0.0.beta4")
gemspec.add_dependency("activesupport", ">= 3.0.0.rc")
gemspec.add_dependency("activemodel", ">= 3.0.0.rc")
gemspec.add_dependency("tzinfo", ">= 0.3.22")
gemspec.add_development_dependency('rspec', '>= 2.0.0.beta.19')
gemspec.version = CouchRest::Model::VERSION
@ -41,15 +42,15 @@ rescue LoadError
end
desc "Run all specs"
Spec::Rake::SpecTask.new('spec') do |t|
t.spec_opts = ["--color"]
t.spec_files = FileList['spec/**/*_spec.rb']
Rspec::Core::RakeTask.new(:spec) do |spec|
spec.spec_opts = ["--color"]
spec.pattern = 'spec/**/*_spec.rb'
end
desc "Print specdocs"
Spec::Rake::SpecTask.new(:doc) do |t|
t.spec_opts = ["--format", "specdoc"]
t.spec_files = FileList['spec/*_spec.rb']
Rspec::Core::RakeTask.new(:doc) do |spec|
spec.spec_opts = ["--format", "specdoc"]
spec.pattern = 'spec/*_spec.rb'
end
desc "Generate the rdoc"

View file

@ -2,10 +2,7 @@
module CouchRest
module Model
module DesignDoc
def self.included(base)
base.extend(ClassMethods)
end
extend ActiveSupport::Concern
module ClassMethods

View file

@ -1,13 +1,13 @@
gem 'couchrest', ">= 1.0.0.beta"
gem 'couchrest', ">= 1.0.0"
require 'couchrest'
gem "tzinfo", ">= 0.3.22"
gem "activesupport", ">= 2.3.5"
gem "activesupport", ">= 3.0.0.rc"
require 'active_support/core_ext'
require 'active_support/json'
gem "activemodel", ">= 3.0.0.beta4"
gem "activemodel", ">= 3.0.0.rc"
require 'active_model'
require "active_model/callbacks"
require "active_model/conversion"

View file

@ -210,7 +210,7 @@ describe "Model Base" do
describe "a doc with template values (CR::Model spec)" do
before(:all) do
WithTemplateAndUniqueID.all.map{|o| o.destroy(true)}
WithTemplateAndUniqueID.all.map{|o| o.destroy}
WithTemplateAndUniqueID.database.bulk_delete
@tmpl = WithTemplateAndUniqueID.new
@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
before(:all) do
WithTemplateAndUniqueID.req_design_doc_refresh
WithTemplateAndUniqueID.all.map{|o| o.destroy(true)}
WithTemplateAndUniqueID.all.map{|o| o.destroy}
WithTemplateAndUniqueID.database.bulk_delete
WithTemplateAndUniqueID.new('important-field' => '1').save
WithTemplateAndUniqueID.new('important-field' => '2').save