class ActiveSupport::TestCase

Public Instance Methods

logged_in(user = users(:one)) click to toggle source

Add more helper methods to be used by all tests here…

# File test/test_helper.rb, line 10
def logged_in(user = users(:one))
  sign_in user, scope: :user
end
sample_file(filename = 'sample-file.png') click to toggle source
# File test/test_helper.rb, line 14
def sample_file(filename = 'sample-file.png')
  File.new(Rails.root.join('test', 'fixtures', 'files', filename))
end