From f8033b427bd73ccfa6177e83a75194a7a9d7c400 Mon Sep 17 00:00:00 2001 From: David Workman Date: Wed, 19 May 2010 21:36:23 +0100 Subject: [PATCH] Changed gemfile to depend on xapor > 0.1.5 and removed the note from the readme that is now redundant due to updates --- .idea/iDoc.iml | 26 +++++++++---------- Gemfile | 3 ++- README | 4 --- .../comments/delete_comment_spec.rb | 4 +-- spec/models/documentation_page_spec.rb | 11 ++------ 5 files changed, 19 insertions(+), 29 deletions(-) diff --git a/.idea/iDoc.iml b/.idea/iDoc.iml index 06c41e4..a770a30 100644 --- a/.idea/iDoc.iml +++ b/.idea/iDoc.iml @@ -12,88 +12,88 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/Gemfile b/Gemfile index ad9b3f7..c1f1998 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,7 @@ gem 'authlogic', "2.1.3" gem 'friendly_id', "3.0.2" gem 'sanitize', "1.2.0" gem 'cancan', "1.0.2" -gem 'xapor', ">= 0.1.0" +gem 'xapor', ">= 0.1.5" gem 'will_paginate', "2.3.12" gem 'mongrel', "1.1.6" @@ -18,6 +18,7 @@ group :test do gem 'rspec-rails', '1.3.2' gem 'spork', '0.8.2' gem 'email_spec', "0.6.2" + gem 'shoulda' end group :cucumber do diff --git a/README b/README index 300ee07..e69de29 100644 --- a/README +++ b/README @@ -1,4 +0,0 @@ -== Notes on deployment == - -With the current in-memory index for xapian and the bundler setup, only the conservative spawn method works -with passenger. \ No newline at end of file diff --git a/spec/controllers/comments/delete_comment_spec.rb b/spec/controllers/comments/delete_comment_spec.rb index 6cd2bb4..28219a6 100644 --- a/spec/controllers/comments/delete_comment_spec.rb +++ b/spec/controllers/comments/delete_comment_spec.rb @@ -3,8 +3,8 @@ describe CommentsController, "Deleting a comment" do before(:each) do @comment = mock_model(Comment, :destroy => true) - @comments = mock_model(Array, :find => @comment) - @doc_page = mock_model(DocumentationPage, :comments => @comments) + @doc_page = mock_model(DocumentationPage) + @doc_page.stub_chain(:comments, :find).and_return(@comment) DocumentationPage.stub!(:find).and_return(@doc_page) end diff --git a/spec/models/documentation_page_spec.rb b/spec/models/documentation_page_spec.rb index 8582220..e85067a 100644 --- a/spec/models/documentation_page_spec.rb +++ b/spec/models/documentation_page_spec.rb @@ -1,15 +1,8 @@ require 'spec_helper' describe DocumentationPage do - it "should not be valid without a title" do - page = DocumentationPage.new(:content => "Some test content") - page.valid?.should be_false - end - - it "should not be valid without content" do - page = DocumentationPage.new(:title => "Testing title") - page.valid?.should be_false - end + it {should validate_presence_of(:title)} + it {should validate_presence_of(:content)} it "should set the position to the lowest value if no position is provided" do DocumentationPage.create(:title => "Test title", :content => "Some content", :position => 1)