rename factory_girl_(rails) to factory_bot_(rails)
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
require 'rails_helper'
|
||||
|
||||
describe Assessor do
|
||||
let(:assessor) { described_class.new(execution_environment: FactoryGirl.build(:ruby)) }
|
||||
let(:assessor) { described_class.new(execution_environment: FactoryBot.build(:ruby)) }
|
||||
|
||||
describe '#assess' do
|
||||
let(:assess) { assessor.assess(stdout: stdout) }
|
||||
@ -53,7 +53,7 @@ describe Assessor do
|
||||
|
||||
context 'with an execution environment without a testing framework adapter' do
|
||||
it 'raises an error' do
|
||||
expect { described_class.new(execution_environment: FactoryGirl.build(:ruby, testing_framework: nil)) }.to raise_error(Assessor::Error)
|
||||
expect { described_class.new(execution_environment: FactoryBot.build(:ruby, testing_framework: nil)) }.to raise_error(Assessor::Error)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -3,10 +3,10 @@ require 'seeds_helper'
|
||||
|
||||
describe DockerClient, docker: true do
|
||||
let(:command) { 'whoami' }
|
||||
let(:docker_client) { described_class.new(execution_environment: FactoryGirl.build(:java), user: FactoryGirl.build(:admin)) }
|
||||
let(:execution_environment) { FactoryGirl.build(:java) }
|
||||
let(:docker_client) { described_class.new(execution_environment: FactoryBot.build(:java), user: FactoryGirl.build(:admin)) }
|
||||
let(:execution_environment) { FactoryBot.build(:java) }
|
||||
let(:image) { double }
|
||||
let(:submission) { FactoryGirl.create(:submission) }
|
||||
let(:submission) { FactoryBot.create(:submission) }
|
||||
let(:workspace_path) { '/tmp' }
|
||||
|
||||
describe '.check_availability!' do
|
||||
@ -146,7 +146,7 @@ describe DockerClient, docker: true do
|
||||
end
|
||||
|
||||
describe '#create_workspace_file' do
|
||||
let(:file) { FactoryGirl.build(:file, content: 'puts 42') }
|
||||
let(:file) { FactoryBot.build(:file, content: 'puts 42') }
|
||||
let(:file_path) { File.join(workspace_path, file.name_with_extension) }
|
||||
after(:each) { File.delete(file_path) }
|
||||
|
||||
|
@ -9,7 +9,7 @@ describe DockerContainerPool do
|
||||
private :reload_class
|
||||
|
||||
before(:each) do
|
||||
@execution_environment = FactoryGirl.create(:ruby)
|
||||
@execution_environment = FactoryBot.create(:ruby)
|
||||
reload_class
|
||||
end
|
||||
|
||||
|
@ -8,7 +8,7 @@ describe FileTree do
|
||||
|
||||
context 'for a media file' do
|
||||
context 'for an audio file' do
|
||||
let(:file) { FactoryGirl.build(:file, file_type: FactoryGirl.build(:dot_mp3)) }
|
||||
let(:file) { FactoryBot.build(:file, file_type: FactoryGirl.build(:dot_mp3)) }
|
||||
|
||||
it 'is an audio file icon' do
|
||||
expect(file_icon).to include('fa-file-audio-o')
|
||||
@ -16,7 +16,7 @@ describe FileTree do
|
||||
end
|
||||
|
||||
context 'for an image file' do
|
||||
let(:file) { FactoryGirl.build(:file, file_type: FactoryGirl.build(:dot_jpg)) }
|
||||
let(:file) { FactoryBot.build(:file, file_type: FactoryGirl.build(:dot_jpg)) }
|
||||
|
||||
it 'is an image file icon' do
|
||||
expect(file_icon).to include('fa-file-image-o')
|
||||
@ -24,7 +24,7 @@ describe FileTree do
|
||||
end
|
||||
|
||||
context 'for a video file' do
|
||||
let(:file) { FactoryGirl.build(:file, file_type: FactoryGirl.build(:dot_mp4)) }
|
||||
let(:file) { FactoryBot.build(:file, file_type: FactoryGirl.build(:dot_mp4)) }
|
||||
|
||||
it 'is a video file icon' do
|
||||
expect(file_icon).to include('fa-file-video-o')
|
||||
@ -34,7 +34,7 @@ describe FileTree do
|
||||
|
||||
context 'for other files' do
|
||||
context 'for a read-only file' do
|
||||
let(:file) { FactoryGirl.build(:file, read_only: true) }
|
||||
let(:file) { FactoryBot.build(:file, read_only: true) }
|
||||
|
||||
it 'is a lock icon' do
|
||||
expect(file_icon).to include('fa-lock')
|
||||
@ -42,7 +42,7 @@ describe FileTree do
|
||||
end
|
||||
|
||||
context 'for an executable file' do
|
||||
let(:file) { FactoryGirl.build(:file, file_type: FactoryGirl.build(:dot_py)) }
|
||||
let(:file) { FactoryBot.build(:file, file_type: FactoryGirl.build(:dot_py)) }
|
||||
|
||||
it 'is a code file icon' do
|
||||
expect(file_icon).to include('fa-file-code-o')
|
||||
@ -50,7 +50,7 @@ describe FileTree do
|
||||
end
|
||||
|
||||
context 'for a renderable file' do
|
||||
let(:file) { FactoryGirl.build(:file, file_type: FactoryGirl.build(:dot_svg)) }
|
||||
let(:file) { FactoryBot.build(:file, file_type: FactoryGirl.build(:dot_svg)) }
|
||||
|
||||
it 'is a text file icon' do
|
||||
expect(file_icon).to include('fa-file-text-o')
|
||||
@ -58,7 +58,7 @@ describe FileTree do
|
||||
end
|
||||
|
||||
context 'for all other files' do
|
||||
let(:file) { FactoryGirl.build(:file, file_type: FactoryGirl.build(:dot_md)) }
|
||||
let(:file) { FactoryBot.build(:file, file_type: FactoryGirl.build(:dot_md)) }
|
||||
|
||||
it 'is a generic file icon' do
|
||||
expect(file_icon).to include('fa-file-o')
|
||||
@ -75,7 +75,7 @@ describe FileTree do
|
||||
|
||||
describe '#initialize' do
|
||||
let(:file_tree) { described_class.new(files) }
|
||||
let(:files) { FactoryGirl.build_list(:file, 10, context: nil, path: 'foo/bar/baz') }
|
||||
let(:files) { FactoryBot.build_list(:file, 10, context: nil, path: 'foo/bar/baz') }
|
||||
|
||||
it 'creates a root node' do
|
||||
expect_any_instance_of(Tree::TreeNode).to receive(:initialize).with(file_tree.send(:root_label))
|
||||
@ -92,7 +92,7 @@ describe FileTree do
|
||||
end
|
||||
|
||||
describe '#map_to_js_tree' do
|
||||
let(:file) { FactoryGirl.build(:file) }
|
||||
let(:file) { FactoryBot.build(:file) }
|
||||
let(:js_tree) { file_tree.send(:map_to_js_tree, node) }
|
||||
let!(:leaf) { root.add(Tree::TreeNode.new('', file)) }
|
||||
let(:root) { Tree::TreeNode.new('', file) }
|
||||
|
@ -1,7 +1,7 @@
|
||||
require 'rails_helper'
|
||||
|
||||
describe Whistleblower do
|
||||
let(:hint) { FactoryGirl.create(:ruby_no_method_error) }
|
||||
let(:hint) { FactoryBot.create(:ruby_no_method_error) }
|
||||
let(:stderr) { "undefined method `foo' for main:Object (NoMethodError)" }
|
||||
let(:whistleblower) { described_class.new(execution_environment: hint.execution_environment) }
|
||||
|
||||
|
Reference in New Issue
Block a user