spec/connection_spec.rb in forj-0.0.34 vs spec/connection_spec.rb in forj-0.0.35
- old
+ new
@@ -18,39 +18,31 @@
require 'rubygems'
require 'spec_helper'
require 'fog'
-require_relative '../lib/connection.rb'
-include Connection
+$APP_PATH = File.dirname(__FILE__)
+$LIB_PATH = File.expand_path(File.join(File.dirname($APP_PATH),'lib'))
+$FORJ_DATA_PATH= File.expand_path('~/.forj')
-class TestClass
-end
+$LOAD_PATH << './lib'
-describe 'network' do
- it 'is connecting to hpcloud' do
- @test_class = TestClass.new
- @test_class.extend(Connection)
+require 'forj-config.rb' # Load class ForjConfig
+require 'log.rb' # Load default loggers
- Fog.mock!
+include Logging
- conn = @test_class.network
- expect(conn).to be
+$FORJ_LOGGER=ForjLog.new('forj-rspec.log', Logger::FATAL)
- Fog::Mock.reset
- end
-end
+require 'connection.rb' # Load class ForjConnection
+describe 'Module: forj-connection' do
-describe 'compute' do
- it 'is connecting to hpcloud' do
- @test_class = TestClass.new
- @test_class.extend(Connection)
+ it 'should connect to hpcloud (smoke test)' do
Fog.mock!
-
- conn = @test_class.compute
+ conn = ForjConnection.new(ForjConfig.new())
expect(conn).to be
Fog::Mock.reset
end
-end
\ No newline at end of file
+end