Sha256: fdf09546f859b46573434dc9cfaa9a5b099bfa054e68d60fe7202344c55a1479

Contents?: true

Size: 734 Bytes

Versions: 25

Compression:

Stored size: 734 Bytes

Contents

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

describe LVS::JsonService::Base do
  it "should include Request" do
    LVS::JsonService::Base.ancestors.should include(LVS::JsonService::Request)
  end
  
  it "should ignore calls to missing methods if ignore_missing is true" do
    class IgnoreMissingExample < LVS::JsonService::Base
      self.ignore_missing = true
    end
    obj = IgnoreMissingExample.new
    obj.do_voodoo.should eql(nil)
  end
  
  it "should raise an exception on missing methods if ignore_missing is not set" do
    class RaiseOnMissingExample < LVS::JsonService::Base; end
    obj = RaiseOnMissingExample.new
    lambda {obj.do_voodoo}.should raise_error(NoMethodError)
  end
  
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
LVS-JSONService-0.2.9 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.3.0 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.3.2 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.3.3 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.5.4 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.5.3 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.5.2 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.5.1 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.5.0 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.4.9 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.4.8 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.4.7 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.4.6 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.4.5 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.4.4 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.4.3 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.4.2 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.4.1 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.4.0 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.3.9 spec/lvs/json_service/base_spec.rb