Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove to_ary stubs

  • Loading branch information...
commit 9f6db140f79bb25d3e27ead3fc3c7fae63c5cb5b 1 parent 3bffd3e
@justinfrench authored
Showing with 0 additions and 8 deletions.
  1. +0 −8 spec/spec_helper.rb
View
8 spec/spec_helper.rb
@@ -124,7 +124,6 @@ def authors_path; "/authors"; end
def new_author_path; "/authors/new"; end
@fred = mock('user')
- @fred.stub!(:to_ary)
@fred.stub!(:class).and_return(::Author)
@fred.stub!(:to_label).and_return('Fred Smith')
@fred.stub!(:login).and_return('fred_smith')
@@ -135,7 +134,6 @@ def new_author_path; "/authors/new"; end
@fred.stub!(:persisted?).and_return(nil)
@bob = mock('user')
- #@bob.stub!(:to_ary)
@bob.stub!(:class).and_return(::Author)
@bob.stub!(:to_label).and_return('Bob Rock')
@bob.stub!(:login).and_return('bob')
@@ -149,7 +147,6 @@ def new_author_path; "/authors/new"; end
@bob.stub!(:persisted?).and_return(nil)
@james = mock('user')
- @james.stub!(:to_ary)
@james.stub!(:class).and_return(::Author)
@james.stub!(:to_label).and_return('James Shock')
@james.stub!(:login).and_return('james')
@@ -164,7 +161,6 @@ def new_author_path; "/authors/new"; end
::Author.stub!(:find).and_return([@fred, @bob])
::Author.stub!(:all).and_return([@fred, @bob])
- ::Author.stub!(:to_ary)
::Author.stub!(:human_attribute_name).and_return { |column_name| column_name.humanize }
::Author.stub!(:human_name).and_return('::Author')
::Author.stub!(:reflect_on_association).and_return { |column_name| mock('reflection', :options => {}, :klass => Post, :macro => :has_many) if column_name == :posts }
@@ -174,7 +170,6 @@ def new_author_path; "/authors/new"; end
# Sometimes we need a mock @post object and some Authors for belongs_to
@new_post = mock('post')
- @new_post.stub!(:to_ary)
@new_post.stub!(:class).and_return(::Post)
@new_post.stub!(:id).and_return(nil)
@new_post.stub!(:new_record?).and_return(true)
@@ -188,7 +183,6 @@ def new_author_path; "/authors/new"; end
@new_post.stub!(:persisted?).and_return(nil)
@freds_post = mock('post')
- @freds_post.stub!(:to_ary)
@freds_post.stub!(:class).and_return(::Post)
@freds_post.stub!(:to_label).and_return('Fred Smith')
@freds_post.stub!(:id).and_return(19)
@@ -233,7 +227,6 @@ def new_author_path; "/authors/new"; end
::Post.stub!(:content_columns).and_return([mock('column', :name => 'title'), mock('column', :name => 'body'), mock('column', :name => 'created_at')])
::Post.stub!(:to_key).and_return(nil)
::Post.stub!(:persisted?).and_return(nil)
- ::Post.stub!(:to_ary)
@mock_file = mock('file')
::Formtastic::SemanticFormBuilder.file_methods.each do |method|
@@ -245,7 +238,6 @@ def new_author_path; "/authors/new"; end
@new_post.stub!(:url)
@new_post.stub!(:phone)
@new_post.stub!(:search)
- @new_post.stub!(:to_ary)
@new_post.stub!(:body)
@new_post.stub!(:published)
@new_post.stub!(:publish_at)
Please sign in to comment.
Something went wrong with that request. Please try again.