Andreas Steinel


50 Experience
0 Lessons Completed
0 Questions Solved


Posted in Simple Test with empty rails fails

Hi everyone,

I'm currently trying to create a template for internal Rails development and I just tried the newest Rails and it fails with a simple test:

/tmp $ mkdir app-test
/tmp $ cd app-test
/tmp/app-test $ rails --version

/tmp/app-test $ rails new .
      create  Rakefile
/tmp/app-test $ rake db:migrate
/tmp/app-test $ cat test/integration/startpage_test.rb
# frozen_string_literal: true

require 'test_helper'

class StartpageTest < ActionDispatch::IntegrationTest
  test 'start page' do
    get '/'
    assert_response :success
/tmp/app-test $ rake test
Run options: --seed 62884

# Running:


DRb::DRbRemoteError: Expected response to be a <2XX: success>, but was a <403: Forbidden> (Minitest::Assertion)
    test/integration/startpage_test.rb:8:in `block in <class:StartpageTest>'

rails test test/integration/startpage_test.rb:6

Finished in 0.570293s, 1.7535 runs/s, 1.7535 assertions/s.
1 runs, 1 assertions, 0 failures, 1 errors, 0 skips

If I run the app, I can view the default rails landing page on an empty setup. It also does not work if I create a new controller rendering inline test with corresponding route entry. I used this kind of test before without any problems.

Any ideas what's wrong here or how I can debug this?

logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.