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.3.8 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.3.7 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.3.6 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.3.5 spec/lvs/json_service/base_spec.rb
LVS-JSONService-0.3.4 spec/lvs/json_service/base_spec.rb