mirror of
https://github.com/varvet/pundit.git
synced 2022-11-09 12:30:11 -05:00
Merge pull request #56 from elabs/test_doubles
Use RSpec double syntax over stub to fix deprecation warning
This commit is contained in:
commit
a6153c6a14
1 changed files with 2 additions and 2 deletions
|
@ -56,11 +56,11 @@ class ArticleTag
|
|||
end
|
||||
|
||||
describe Pundit do
|
||||
let(:user) { stub }
|
||||
let(:user) { double }
|
||||
let(:post) { Post.new(user) }
|
||||
let(:comment) { Comment.new }
|
||||
let(:article) { Article.new }
|
||||
let(:controller) { stub(:current_user => user, :params => { :action => "update" }).tap { |c| c.extend(Pundit) } }
|
||||
let(:controller) { double(:current_user => user, :params => { :action => "update" }).tap { |c| c.extend(Pundit) } }
|
||||
let(:artificial_blog) { ArtificialBlog.new }
|
||||
let(:article_tag) { ArticleTag.new }
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue