Skip to content
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.

Commit

Permalink
FactoryGirl => FactoryBot (opf/openproject#6304)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed May 7, 2018
1 parent 4412a72 commit 943fba1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Expand Up @@ -31,10 +31,10 @@
before do
allow(@controller).to receive(:require_admin) { true }

@default_config = FactoryGirl.create(:default_export_card_configuration)
@custom_config = FactoryGirl.create(:export_card_configuration)
@active_config = FactoryGirl.create(:active_export_card_configuration)
@inactive_config = FactoryGirl.create(:inactive_export_card_configuration)
@default_config = FactoryBot.create(:default_export_card_configuration)
@custom_config = FactoryBot.create(:export_card_configuration)
@active_config = FactoryBot.create(:active_export_card_configuration)
@inactive_config = FactoryBot.create(:inactive_export_card_configuration)
@params = {}
@valid_rows_yaml = "group1:\n has_border: false\n rows:\n row1:\n height: 50\n priority: 1\n columns:\n id:\n has_label: false"
@invalid_rows_yaml = "group1:\n invalid_property: true"
Expand Down
2 changes: 1 addition & 1 deletion spec/factories/export_card_configuration_factory.rb
Expand Up @@ -24,7 +24,7 @@
#++


FactoryGirl.define do
FactoryBot.define do
factory :export_card_configuration do
name "Config 1"
description "This is a description"
Expand Down
2 changes: 1 addition & 1 deletion spec/views/edit.html.erb_spec.rb
Expand Up @@ -27,7 +27,7 @@
require 'spec_helper'

describe 'export_card_configurations/edit', :type => :view do
let(:config) { FactoryGirl.build(:export_card_configuration) }
let(:config) { FactoryBot.build(:export_card_configuration) }

before do
config.save
Expand Down
4 changes: 2 additions & 2 deletions spec/views/index.html.erb_spec.rb
Expand Up @@ -27,8 +27,8 @@
require 'spec_helper'

describe 'export_card_configurations/index', :type => :view do
let(:config1) { FactoryGirl.build(:export_card_configuration, name: "Config 1") }
let(:config2) { FactoryGirl.build(:export_card_configuration, name: "Config 2") }
let(:config1) { FactoryBot.build(:export_card_configuration, name: "Config 1") }
let(:config2) { FactoryBot.build(:export_card_configuration, name: "Config 2") }

before do
config1.save
Expand Down
2 changes: 1 addition & 1 deletion spec/views/new.html.erb_spec.rb
Expand Up @@ -27,7 +27,7 @@
require 'spec_helper'

describe 'export_card_configurations/new', :type => :view do
let(:config) { FactoryGirl.build(:export_card_configuration) }
let(:config) { FactoryBot.build(:export_card_configuration) }

before do
assign(:config, config)
Expand Down

0 comments on commit 943fba1

Please sign in to comment.