Sha256: b58726f80aa18620782ec1d5814cb61306fb0c9cfd705f7cc7cf2601043b6139
Contents?: true
Size: 791 Bytes
Versions: 2
Compression:
Stored size: 791 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') module Gritano::Core describe Key do before(:all) do ActiveRecord::Base.establish_connection(YAML::load(File.open('spec/data/development.yml'))) end it "should generate the authorized_keys file" do user = double("User") user.stub(:login).and_return('user_login') keys = [double("Key#1"), double("key#2")] keys[0].stub(:user).and_return(user) keys[0].stub(:key).and_return("some_key") keys[1].stub(:user).and_return(user) keys[1].stub(:key).and_return("some_key") Key.stub(:all).and_return(keys) Key.authorized_keys.should be == "command=\"gritano-remote user_login\" some_key\ncommand=\"gritano-remote user_login\" some_key" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gritano-2.0.1 | spec/gritano/core/key_spec.rb |
gritano-2.0.0 | spec/gritano/core/key_spec.rb |