minor changes

This commit is contained in:
Hauke Klement
2015-02-24 16:25:47 +01:00
parent 3f12e25b7f
commit 113e05d310
4 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@ FactoryGirl.create(:consumer)
FactoryGirl.create(:consumer, name: 'openSAP')
# users
%w(admin external_user teacher).each { |factory_name| FactoryGirl.create(factory_name) }
[:admin, :external_user, :teacher].each { |factory_name| FactoryGirl.create(factory_name) }
# execution environments
ExecutionEnvironment.create_factories

View File

@ -181,7 +181,7 @@ FactoryGirl.define do
singleton_file_type
end
%w(binary executable renderable).each do |attribute|
[:binary, :executable, :renderable].each do |attribute|
trait(attribute) { send(attribute, true) }
end

View File

@ -1,5 +1,5 @@
FactoryGirl.define do
%w(admin external_user teacher).each do |factory_name|
[:admin, :external_user, :teacher].each do |factory_name|
trait :"created_by_#{factory_name}" do
association :user, factory: factory_name
end

View File

@ -18,7 +18,7 @@ describe Submission do
expect(described_class.create.errors[:user_type]).to be_present
end
%w(download render run test).each do |action|
[:download, :render, :run, :test].each do |action|
describe "##{action}_url" do
let(:url) { @submission.send(:"#{action}_url") }