1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Changed authm_mad test to be runable from test dir

This commit is contained in:
Javi Fontan 2011-06-18 18:22:56 +02:00
parent 41bbe8ccb9
commit 2dd628cc36
4 changed files with 12 additions and 5 deletions

View File

@ -14,6 +14,8 @@
# limitations under the License. #
#--------------------------------------------------------------------------- #
$: << '../'
require 'spec_common'
require 'client_mock'
@ -21,7 +23,7 @@ require 'one_usage'
describe "OneUsage" do
before(:all) do
mock_data=YAML::load(File.read('spec/oca_vms.yaml'))
mock_data=YAML::load(File.read('oca_vms.yaml'))
client=ClientMock.new(mock_data)
@one_usage=OneUsage.new(client)
end

View File

@ -14,6 +14,8 @@
# limitations under the License. #
#--------------------------------------------------------------------------- #
$: << '../'
require 'spec_common'
require 'client_mock'
@ -30,7 +32,7 @@ end
describe 'Quota' do
before(:all) do
@db=Sequel.sqlite
mock_data=YAML::load(File.read('spec/oca_vms.yaml'))
mock_data=YAML::load(File.read('oca_vms.yaml'))
client=ClientMock.new(mock_data)
@quota=Quota.new(@db, client)
end

View File

@ -14,6 +14,8 @@
# limitations under the License. #
#--------------------------------------------------------------------------- #
$: << '../'
require 'spec_common'
require 'client_mock'
@ -64,7 +66,7 @@ end
describe SimplePermissions do
before(:all) do
@db=Sequel.sqlite
mock_data=YAML::load(File.read('spec/oca_vms.yaml'))
mock_data=YAML::load(File.read('oca_vms.yaml'))
client=ClientMock.new(mock_data)
@perm=SimplePermissions.new(@db, client, YAML::load(CONF))
end

View File

@ -16,10 +16,11 @@
require 'pp'
$: << '../../oca/ruby'
$: << '..'
require 'db_helpers'
$: << '../oca/ruby'
$: << './spec'