Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Protip: Remove the specs, too

  • Loading branch information...
commit a25bd5dd95945153640d8b4b4cdab3da0926d0af 1 parent 3652ca3
@namelessjon namelessjon authored
Showing with 0 additions and 44 deletions.
  1. +0 −44 spec/rbnacl/ciphertext_spec.rb
View
44 spec/rbnacl/ciphertext_spec.rb
@@ -1,44 +0,0 @@
-# encoding: binary
-require 'spec_helper'
-
-describe Crypto::Ciphertext do
- let(:text) { "hello" }
- let(:primitive) { :test }
- let(:ciphertext) { described_class.new(text, primitive) }
- let(:encoded_ciphertext) { described_class.new(text, primitive, :hex) }
- it "returns the ciphertext on #to_s" do
- ciphertext.to_s.should == text
- end
-
- it "returns the primitive" do
- ciphertext.primitive.should be primitive
- end
-
- it "interpolates correctly" do
- "#{ciphertext}".should == text
- end
-
- it "packs correctly" do
- [ciphertext].pack('a*').should == text
- end
-
- it "encodes when asked" do
- ciphertext.to_s(:hex).should == Crypto::Encoder[:hex].encode(text)
- end
-
- it "behaves like a string for equality" do
- ciphertext.should == text
- end
-
- it "behaves like a string for addition" do
- (ciphertext + text).should == text * 2
- end
-
- it "behaves like a string for addition" do
- (text + ciphertext).should == text * 2
- end
-
- it "accepts a default encoding" do
- encoded_ciphertext.should == Crypto::Encoder[:hex].encode(text)
- end
-end
Please sign in to comment.
Something went wrong with that request. Please try again.