File tree Expand file tree Collapse file tree 7 files changed +81
-2
lines changed
Expand file tree Collapse file tree 7 files changed +81
-2
lines changed Original file line number Diff line number Diff line change 11PATH
22 remote: .
33 specs:
4- edb (0.2 )
4+ edb (0.2.2 )
55 aws-sdk (= 1.59.1 )
66
77GEM
1212 aws-sdk-v1 (1.59.1 )
1313 json (~> 1.4 )
1414 nokogiri (>= 1.4.4 )
15+ diff-lcs (1.2.5 )
1516 json (1.8.3 )
1617 mini_portile (0.6.2 )
1718 nokogiri (1.6.6.2 )
1819 mini_portile (~> 0.6.0 )
20+ rspec (3.3.0 )
21+ rspec-core (~> 3.3.0 )
22+ rspec-expectations (~> 3.3.0 )
23+ rspec-mocks (~> 3.3.0 )
24+ rspec-core (3.3.2 )
25+ rspec-support (~> 3.3.0 )
26+ rspec-expectations (3.3.1 )
27+ diff-lcs (>= 1.2.0 , < 2.0 )
28+ rspec-support (~> 3.3.0 )
29+ rspec-mocks (3.3.2 )
30+ diff-lcs (>= 1.2.0 , < 2.0 )
31+ rspec-support (~> 3.3.0 )
32+ rspec-support (3.3.0 )
1933
2034PLATFORMS
2135 ruby
2236
2337DEPENDENCIES
38+ bundler (~> 1.10 )
2439 edb !
40+ rspec (~> 3.3 )
2541
2642BUNDLED WITH
2743 1.10.4
Original file line number Diff line number Diff line change 11#! /usr/bin/env ruby
22require 'rake'
33
4- task default : [ :build , :install ]
4+ task default : [ :build , :install , :test ]
55
66task :build do
77 sh 'gem build edb.gemspec'
1010task :install do
1111 sh 'gem install *.gem'
1212end
13+
14+ task :test do
15+ FileUtils . cd 'specs' do
16+ Dir [ '*_spec.rb' ] . each do |spec |
17+ sh "rspec #{ spec } --backtrace --color --format doc"
18+ end
19+ end
20+ end
Original file line number Diff line number Diff line change @@ -16,4 +16,7 @@ Gem::Specification.new { |s|
1616 s . require_paths = [ 'lib' ]
1717
1818 s . add_dependency 'aws-sdk' , '1.59.1'
19+
20+ s . add_development_dependency 'rspec' , '~> 3.3'
21+ s . add_development_dependency 'bundler' , '~> 1.10'
1922}
Original file line number Diff line number Diff line change 1+ require_relative 'spec_helper'
2+
3+ describe EDB ::Cryptography do
4+ describe '#supports?' do
5+ context 'given algorithm is supported' do
6+ it 'returns true' do
7+ expect ( EDB ::Cryptography . supports? ( 'AES_256_CBC' ) ) . to be_truthy
8+ end
9+ end
10+
11+ context 'given algorithm is not supported' do
12+ it 'returns false' do
13+ expect ( EDB ::Cryptography . supports? ( 'LOL_WUT_128' ) ) . to be_falsy
14+ end
15+ end
16+ end
17+ end
Original file line number Diff line number Diff line change 1+ require_relative 'spec_helper'
2+
3+ describe EDB ::Storage do
4+ describe '#supports?' do
5+ context 'given storage device is supported' do
6+ it 'returns true' do
7+ expect ( EDB ::Storage . supports? ( 'S3' ) ) . to be_truthy
8+ end
9+ end
10+
11+ context 'given storage device is not supported' do
12+ it 'returns false' do
13+ expect ( EDB ::Storage . supports? ( 'CappellaAmbrosiana' ) ) . to be_falsy
14+ end
15+ end
16+ end
17+ end
Original file line number Diff line number Diff line change 1+ require 'edb'
Original file line number Diff line number Diff line change 1+ require_relative 'spec_helper'
2+
3+ describe EDB ::Cryptography do
4+ describe '#supports?' do
5+ context 'given algorithm is supported' do
6+ it 'returns true' do
7+ expect ( EDB ::Cryptography . supports? ( 'AES_256_CBC' ) ) . to be_truthy
8+ end
9+ end
10+
11+ context 'given algorithm is not supported' do
12+ it 'returns false' do
13+ expect ( EDB ::Cryptography . supports? ( 'LOL_WUT_128' ) ) . to be_falsy
14+ end
15+ end
16+ end
17+ end
You can’t perform that action at this time.
0 commit comments