diff options
Diffstat (limited to 'spec/kdbx_spec.rb')
| -rw-r--r-- | spec/kdbx_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/kdbx_spec.rb b/spec/kdbx_spec.rb new file mode 100644 index 0000000..f305d07 --- /dev/null +++ b/spec/kdbx_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +RSpec.describe Trunk::KDBX do + subject { described_class.new(path, password: password) } + let(:path) { 'spec/fixtures/trunk.kdbx' } + let(:password) { 'password' } + + describe "#each" do + specify { expect(subject.count).to eql(1) } + specify { expect(subject.first[:title]).to eql('voltron') } + specify { expect(subject.first[:username]).to eql('hunk') } + specify { expect(subject.first[:password]).to eql('TsuyoshiGarett') } + specify { expect(subject.first[:url]).to eql('http://voltron.wikia.com') } + end +end |
