Sha256: 08211a486a981f426ff490a247b867f72b5c6304f7b7973e9d21615d5d44a8f0

Contents?: true

Size: 866 Bytes

Versions: 9

Compression:

Stored size: 866 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

class TestRemoteClass < PoolParty::Remote::RemoteInstance
  include CloudResourcer
  include PoolParty::Remote
end

describe "RemoterBase" do
  before(:each) do
    @tr = TestRemoteClass.new
  end
  %w(launch_new_instance! terminate_instance describe_instance instances_list).each do |method|
    eval <<-EOE
        it "should raise an exception if #{method} is not defined as a method" do
          # pending # Weird .should raise_error
          lambda { @tr.class.#{method} }.should raise_error
        end
        it "should not raise an exception if #{method} is defined as a method" do
          lambda {
            @tr.instance_eval do
              def #{method}      
              end
            end
            @tr.#{method}
          }.should_not raise_error
        end
EOE
        
  end
end
    

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
auser-poolparty-1.2.10 spec/poolparty/net/remoter_base_spec.rb
auser-poolparty-1.2.11 spec/poolparty/net/remoter_base_spec.rb
auser-poolparty-1.2.12 spec/poolparty/net/remoter_base_spec.rb
auser-poolparty-1.2.3 spec/poolparty/net/remoter_base_spec.rb
auser-poolparty-1.2.4 spec/poolparty/net/remoter_base_spec.rb
auser-poolparty-1.2.7 spec/poolparty/net/remoter_base_spec.rb
auser-poolparty-1.2.8 spec/poolparty/net/remoter_base_spec.rb
auser-poolparty-1.2.9 spec/poolparty/net/remoter_base_spec.rb
fairchild-poolparty-1.2.12 spec/poolparty/net/remoter_base_spec.rb