Sha256: 310588d566ab760fe625645f74817be4c39ad206ebf8ed210cfed9fede532b42
Contents?: true
Size: 1.02 KB
Versions: 4
Compression:
Stored size: 1.02 KB
Contents
require File.expand_path('../spec_helper', __FILE__) include MockSpecHelper describe RightApi::Resources do context "Given a logged in RightScale user" do before(:each) do given_user_facing_client end it "Should have the required methods for instances of the Resources class" do resource = RightApi::Resources.new(@client, '/api/deployments', 'deployments') resource.api_methods.sort.collect{|s| s.to_s}.should == ["create", "index"] end it "Should not have index 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{|s| s.to_s}.should == ["by_resource", "by_tag", "multi_add", "multi_delete"] end it "Should have resource-specific methods for instances of the Resources class" do resource = RightApi::Resources.new(@client, '/api/backups', 'backups') resource.api_methods.sort.collect{|s| s.to_s}.should == ["cleanup", "create", "index"] end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
right_api_client-1.5.5 | spec/resources_spec.rb |
right_api_client-1.5.4 | spec/resources_spec.rb |
right_api_client-1.5.3 | spec/resources_spec.rb |
right_api_client-1.5.2 | spec/resources_spec.rb |