mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
2bd274eb23
Using spec form is going to be the standard way to testing (but relying on asserts). This update allows the test(s) to be picked up by the main rake task again.
37 lines
881 B
Ruby
37 lines
881 B
Ruby
require "minitest/autorun"
|
|
require "fog/brightbox"
|
|
|
|
describe Fog::Compute::Brightbox do
|
|
before do
|
|
@arguments = {
|
|
:brightbox_auth_url => "http://localhost",
|
|
:brightbox_api_url => "http://localhost",
|
|
:brightbox_client_id => "",
|
|
:brightbox_secret => "",
|
|
:brightbox_username => "",
|
|
:brightbox_password => "",
|
|
:brightbox_account => ""
|
|
}
|
|
|
|
@credential_guard = Minitest::Mock.new
|
|
def @credential_guard.reject
|
|
{}
|
|
end
|
|
|
|
Fog.stub :credentials, @credential_guard do
|
|
@service = Fog::Compute::Brightbox.new(@arguments)
|
|
end
|
|
end
|
|
|
|
it "responds to #request" do
|
|
assert_respond_to @service, :request
|
|
end
|
|
|
|
it "responds to #request_access_token" do
|
|
assert_respond_to @service, :request_access_token
|
|
end
|
|
|
|
it "responds to #wrapped_request" do
|
|
assert_respond_to @service, :wrapped_request
|
|
end
|
|
end
|