Skip to content

Commit

Permalink
Stubbed User.find_by method in test
Browse files Browse the repository at this point in the history
  • Loading branch information
hzchirs committed Aug 28, 2017
1 parent bb2bd6f commit c146c93
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/test_helper.rb
Expand Up @@ -5,6 +5,10 @@
require "action_controller"

User = Struct.new(:id) do
def self.find_by(id: nil)
new(id)
end

def self.where(id: nil)
[new(id)]
end
Expand Down

0 comments on commit c146c93

Please sign in to comment.