rosa-build/spec/factories/key_pair.rb

20 lines
446 B
Ruby
Raw Permalink Normal View History

2012-07-16 17:36:47 +01:00
FactoryGirl.define do
factory :key_pair do
association :repository
association :user
2012-12-20 16:21:43 +00:00
public {
file = File.open(Rails.root.join('spec', 'support', 'fixtures', 'pubring.gpg'), "rb")
contents = file.read
file.close
contents
}
secret {
file = File.open(Rails.root.join('spec', 'support', 'fixtures', 'secring.gpg'), "rb")
contents = file.read
file.close
contents
}
2012-07-16 17:36:47 +01:00
end
end