Sha256: 9978eada3f8bbb67120c30e03ad6fd5fb96529e3e8eda1e1ff7681abe9a82321

Contents?: true

Size: 690 Bytes

Versions: 14

Compression:

Stored size: 690 Bytes

Contents

require 'spec_helper'
require 'ronin/credential'

describe Credential do
  let(:name) { 'alice' }
  let(:secret) { 'secret' }

  subject do
    Credential.new(
      :user_name => {:name => name},
      :password => {:clear_text => secret}
    )
  end

  it "should provide the user-name" do
    subject.user.should == name
  end

  it "should provide the clear-text password" do
    subject.clear_text.should == secret
  end

  it "should be convertable to a String" do
    subject.to_s.should == "#{name}:#{secret}"
  end

  it "should implicitly splat the user-name and password" do
    user_name, password = subject

    user_name.should == name
    password.should == secret
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ronin-1.4.0 spec/credential_spec.rb
ronin-1.4.0.rc2 spec/credential_spec.rb
ronin-1.4.0.rc1 spec/credential_spec.rb
ronin-1.3.0 spec/credential_spec.rb
ronin-1.2.0 spec/credential_spec.rb
ronin-1.1.0 spec/credential_spec.rb
ronin-1.1.0.rc3 spec/credential_spec.rb
ronin-1.1.0.rc2 spec/credential_spec.rb
ronin-1.1.0.rc1 spec/credential_spec.rb
ronin-1.0.0 spec/credential_spec.rb
ronin-1.0.0.rc3 spec/credential_spec.rb
ronin-1.0.0.rc2 spec/credential_spec.rb
ronin-1.0.0.rc1 spec/credential_spec.rb
ronin-1.0.0.pre4 spec/credential_spec.rb