Sha256: 2684705b1bc513993864b4859c1deeb249a00fcca678bf9287a43aecd756abaf

Contents?: true

Size: 1.07 KB

Versions: 23

Compression:

Stored size: 1.07 KB

Contents

require 'spec_helper'

describe Net::LDAP::Entry do
  attr_reader :entry
  before(:each) do
    @entry = Net::LDAP::Entry.from_single_ldif_string(
      %Q{dn: something
foo: foo
barAttribute: bar
      }
    )
  end

  describe "entry access" do
    it "should always respond to #dn" do
      entry.should respond_to(:dn)
    end 
    
    context "<- #foo" do
      it "should respond_to?" do
        entry.should respond_to(:foo)
      end 
      it "should return 'foo'" do
        entry.foo.should == ['foo']
      end
    end
    context "<- #Foo" do
      it "should respond_to?" do
        entry.should respond_to(:Foo)
      end 
      it "should return 'foo'" do
        entry.foo.should == ['foo']
      end 
    end
    context "<- #foo=" do
      it "should respond_to?" do
        entry.should respond_to(:foo=)
      end 
      it "should set 'foo'" do
        entry.foo= 'bar'
        entry.foo.should == ['bar']
      end 
    end
    context "<- #fOo=" do
      it "should return 'foo'" do
        entry.fOo= 'bar'
        entry.fOo.should == ['bar']
      end 
    end
  end
end

Version data entries

23 entries across 23 versions & 9 rubygems

Version Path
net-ldap-0.8.0 spec/unit/ldap/entry_spec.rb
net-ldap-0.7.0 spec/unit/ldap/entry_spec.rb
net-ldap-0.6.1 spec/unit/ldap/entry_spec.rb
net-ldap-0.6.0 spec/unit/ldap/entry_spec.rb
net-ldap-0.5.1 spec/unit/ldap/entry_spec.rb
datacom-net-ldap-0.5.0.datacom spec/unit/ldap/entry_spec.rb
socialcast-net-ldap-0.1.8 spec/unit/ldap/entry_spec.rb
socialcast-net-ldap-0.1.7 spec/unit/ldap/entry_spec.rb
adams-net-ldap-0.4.0 spec/unit/ldap/entry_spec.rb
obis-net-ldap-0.4.0 spec/unit/ldap/entry_spec.rb
net-ldap-1-0.4.0 spec/unit/ldap/entry_spec.rb
socialcast-net-ldap-0.1.6 spec/unit/ldap/entry_spec.rb
socialcast-net-ldap-0.1.5 spec/unit/ldap/entry_spec.rb
net-ldap-0.3.1 spec/unit/ldap/entry_spec.rb
net-ldap-0.3.0 spec/unit/ldap/entry_spec.rb
prathe_net-ldap-0.2.20110317223538 spec/unit/ldap/entry_spec.rb
prathe-net-ldap-0.2.20110317223538 spec/unit/ldap/entry_spec.rb
net-ldap-0.2.2 spec/unit/ldap/entry_spec.rb
net-ldap-0.2.1 spec/unit/ldap/entry_spec.rb
net-ldap-0.2 spec/unit/ldap/entry_spec.rb