Sha256: 45f13156da700f0fab3fb891d1f6139dca12df5b5afe01a74f043f0428ef285d
Contents?: true
Size: 1013 Bytes
Versions: 8
Compression:
Stored size: 1013 Bytes
Contents
require File.expand_path('../../spec_helper', __FILE__) describe RightApi::Resources do context "given a logged in RightScale user" do before(:each) do given_user_facing_client end it "has the required methods for instances of the Resources class" do resource = RightApi::Resources.new(@client, '/api/deployments', 'deployments') resource.api_methods.sort.collect(&:to_s).should == %w[ create index ] end it "has index even for instances of the Resources class that do not support it" do resource = RightApi::Resources.new(@client, '/api/tags', 'tags') resource.api_methods.sort.collect(&:to_s).should == %w[ by_resource by_tag create index multi_add multi_delete ] end it "has resource-specific methods for instances of the Resources class" do resource = RightApi::Resources.new(@client, '/api/backups', 'backups') resource.api_methods.sort.collect(&:to_s).should == %w[ cleanup create index ] end end end
Version data entries
8 entries across 8 versions & 1 rubygems