lovely-rufus 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- metadata +54 -33
- data/.rubocop.yml +0 -23
- data/.ruby-version +0 -1
- data/Gemfile +0 -2
- data/Gemfile.lock +0 -39
- data/LICENCE +0 -661
- data/README.md +0 -70
- data/Rakefile +0 -18
- data/bin/lovely-rufus +0 -4
- data/config/reek.yml +0 -0
- data/lib/lovely-rufus.rb +0 -5
- data/lib/lovely-rufus/executable.rb +0 -25
- data/lib/lovely-rufus/wrapper.rb +0 -93
- data/lovely-rufus.gemspec +0 -14
- data/spec/fixtures/wrapper.yml +0 -188
- data/spec/lovely-rufus/executable_spec.rb +0 -25
- data/spec/lovely-rufus/wrapper_spec.rb +0 -26
- data/spec/spec_helper.rb +0 -5
@@ -1,26 +0,0 @@
|
|
1
|
-
require_relative '../spec_helper'
|
2
|
-
|
3
|
-
module LovelyRufus describe Wrapper do
|
4
|
-
describe '#wrapped' do
|
5
|
-
it 'returns properly wrapped input' do
|
6
|
-
YAML.load_file('spec/fixtures/wrapper.yml').each do |wrapping|
|
7
|
-
width = wrapping.fetch('width') { 72 }
|
8
|
-
wrapped = Wrapper.new(wrapping['input']).wrapped width
|
9
|
-
wrapped.must_equal wrapping['output']
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
it 'silently strips trailing newlines' do
|
14
|
-
wrapped = Wrapper.new("a problematic example\n").wrapped 13
|
15
|
-
wrapped.must_equal "a problematic\nexample"
|
16
|
-
end
|
17
|
-
|
18
|
-
it 'doesn’t breeak on email-quoted single words' do
|
19
|
-
Wrapper.new('> word').wrapped.must_equal '> word'
|
20
|
-
end
|
21
|
-
|
22
|
-
it 'works with empty strings' do
|
23
|
-
Wrapper.new("\n").wrapped.must_equal ''
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end end
|