spec/parsel_spec.rb in parsel-0.1.1 vs spec/parsel_spec.rb in parsel-0.2.0
- old
+ new
@@ -1,18 +1,18 @@
-require "spec_helper"
+require 'spec_helper'
describe Parsel do
- let(:key) { "my secret key" }
+ let(:key) { 'my secret key' }
- it "encrypts data" do
- Parsel.encrypt(key, "hello").should_not eql("hello")
+ it 'encrypts data' do
+ expect(Parsel.encrypt(key, 'hello')).not_to eq('hello')
end
- it "decrypts data" do
- encrypted = Parsel.encrypt(key, "hello")
- Parsel.decrypt(key, encrypted).should eql("hello")
+ it 'decrypts data' do
+ encrypted = Parsel.encrypt(key, 'hello')
+ expect(Parsel.decrypt(key, encrypted)).to eq('hello')
end
- it "returns false when decryption fails" do
- Parsel.decrypt("abc", "123").should be_false
+ it 'returns false when decryption fails' do
+ expect(Parsel.decrypt('abc', '123')).to be_falsy
end
end