spec/simple-hasher_spec.rb in simple-hasher-0.0.1 vs spec/simple-hasher_spec.rb in simple-hasher-0.0.2

- old
+ new

@@ -1,26 +1,26 @@ require './spec/spec_helper.rb' -require './lib/simple-hasher.rb' +require './lib/simplehasher.rb' -describe Simple::Hasher do +describe SimpleHasher do describe "encode" do it 'should encode a single digit integer' do num = 1 - Simple::Hasher.encode(num).should== Simple::Hasher::ALLOWED_CHARS[num] + SimpleHasher.encode(num).should== SimpleHasher::ALLOWED_CHARS[num] end it 'should encode an integer into a multi-character string' do - Simple::Hasher.encode(5779).should== "LQv" + SimpleHasher.encode(5779).should== "LQv" end end describe 'decode' do it 'should decode a string to a single digit integer' do num = 1 - Simple::Hasher.decode('L').should== num + SimpleHasher.decode('L').should== num end it 'should encode an integer into a multi-character string' do - Simple::Hasher.decode("LQv").should== 5779 + SimpleHasher.decode("LQv").should== 5779 end end end