Align project files with CodeHarbor

Since both projects are developed together and by the same team, we also want to have the same code structure and utility methods available in both projects. Therefore, this commit changes many files, but without a functional change.
This commit is contained in:
Sebastian Serth
2023-10-10 23:25:02 +02:00
parent fb3e8972d9
commit 99bd46af1a
112 changed files with 433 additions and 320 deletions

View File

@ -2,7 +2,7 @@
require 'rails_helper'
describe Admin::DashboardHelper do
RSpec.describe Admin::DashboardHelper do
before do
create(:ruby)
dcp = class_double Runner::Strategy::DockerContainerPool

View File

@ -2,7 +2,7 @@
require 'rails_helper'
describe ApplicationHelper do
RSpec.describe ApplicationHelper do
describe '#code_tag' do
context 'with code' do
let(:code) { 'puts 42' }
@ -80,7 +80,7 @@ describe ApplicationHelper do
end
describe '#row' do
let(:html) { row(label: 'foo', value: 42) }
let(:html) { row(label: 'shared.show', value: 42) }
it "builds nested 'div' tags" do
expect(html).to have_css('div.attribute-row.row div.col-md-3 + div.col-md-9')

View File

@ -2,7 +2,7 @@
require 'rails_helper'
describe AuthenticatedUrlHelper do
RSpec.describe AuthenticatedUrlHelper do
describe '#add_query_parameters' do
it 'adds the given parameters to the given url' do
expect(described_class.add_query_parameters(root_url, {foo: 'bar'})).to eq(root_url(foo: 'bar'))

View File

@ -2,7 +2,7 @@
require 'rails_helper'
describe ExerciseHelper do
RSpec.describe ExerciseHelper do
describe '#embedding_parameters' do
let(:exercise) { build(:dummy) }

View File

@ -4,7 +4,7 @@ require 'find'
require 'active_support'
require 'rails'
describe 'yaml config files' do
RSpec.describe 'yaml config files' do
Find.find(__dir__, 'config') do |path|
next unless /.*.\.yml/.match?(path)