Sped up specs, fixed env

This commit is contained in:
ilya 2010-07-08 21:23:08 -04:00
parent 122bbf0cd2
commit 895742824d
4 changed files with 5 additions and 6 deletions

View file

@ -43,6 +43,7 @@ class User < Person
end
def generate_key
puts "Generating key"
ctx = GPGME::Ctx.new
paramstring = "<GnupgKeyParms format=\"internal\">
Key-Type: DSA

View file

@ -4,5 +4,5 @@ Haml::Template.options[:format] = :html5
# Initialize the rails application
Diaspora::Application.initialize!
ENV['GNUPGHOME'] = File.expand_path("../../gpg-#{Rails.env}/", __FILE__)
ENV['GNUPGHOME'] = File.expand_path("../../gpg/diaspora-#{Rails.env}/", __FILE__)
GPGME::check_version({})

View file

@ -30,11 +30,6 @@ RSpec.configure do |config|
config.after(:each) do
DatabaseCleaner.clean
end
config.after(:suite) do
ctx = GPGME::Ctx.new
keys = ctx.keys
keys.each{|k| ctx.delete_key(k, true)}
end
end
def stub_sockets_controller
mock_sockets_controller = mock('sockets mock')

View file

@ -2,6 +2,9 @@ require File.dirname(__FILE__) + '/spec_helper'
describe 'user encryption' do
before :all do
ctx = GPGME::Ctx.new
keys = ctx.keys
keys.each{|k| ctx.delete_key(k, true)}
@u = User.new
@u.email = "george@aol.com"
@u.password = "bluepin7"