Sha256: 4c451b0bb336f016d48e1bc6fe333f0af0cf5c469d0189d33a497608336640d8

Contents?: true

Size: 1.48 KB

Versions: 22

Compression:

Stored size: 1.48 KB

Contents

#--
# Copyright (c) 2010-2012 RightScale Inc
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#++

require 'rubygems'
require 'rest_connection'
require 'ruby-debug'

describe Server, "using a server" do
  before(:all) do
  end

  it "should use method_missing for assignment" do
    @server = Server.find(37842) # hardcoded, you must change to valid server in your account
    @server.max_spot_price = "0.01"
    @server.pricing = "spot"
    @server.save
    @server.max_spot_price.should == "0.01"
  end

end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
rest_connection-1.0.16 spec/method_missing_spec.rb
rest_connection-1.0.15 spec/method_missing_spec.rb
rest_connection-1.0.14 spec/method_missing_spec.rb
rest_connection-1.0.13 spec/method_missing_spec.rb
rest_connection-1.0.12 spec/method_missing_spec.rb
rest_connection-1.0.11 spec/method_missing_spec.rb
rest_connection-1.0.10 spec/method_missing_spec.rb
rest_connection-1.0.9 spec/method_missing_spec.rb
rest_connection-1.0.8 spec/method_missing_spec.rb
rest_connection-1.0.7 spec/method_missing_spec.rb
rest_connection-1.0.6 spec/method_missing_spec.rb
rest_connection-1.0.5 spec/method_missing_spec.rb
rest_connection-1.0.4 spec/method_missing_spec.rb
rest_connection-1.0.3 spec/method_missing_spec.rb
rest_connection-1.0.2 spec/method_missing_spec.rb
rest_connection-1.0.1 spec/method_missing_spec.rb
rest_connection-1.0.0 spec/method_missing_spec.rb
rest_connection-0.1.12 spec/method_missing_spec.rb
rest_connection-0.1.11 spec/method_missing_spec.rb
rest_connection-0.1.10 spec/method_missing_spec.rb