Sha256: b03a575ae5165906aedf85b2ef435352d6162e80521af3dfc36680f357c1be64
Contents?: true
Size: 1.03 KB
Versions: 3
Compression:
Stored size: 1.03 KB
Contents
require 'spec_helper' describe "see also section" do before do @see_also = SeeAlsoSection.new do |also| also.reference "madeup", 4 also.reference "rails", 1 also.reference "ruby" also.reference "perl", 1 end end it "has a see also section" do @see_also.to_groff.should.match(/^\.Sh SEE ALSO/) end it "includes references in its see also section" do groffed = @see_also.to_groff groffed.should.match(/^\.Xr rails 1$/) groffed.should.match(/^\.Xr ruby$/) groffed.should.match(/^\.Xr perl 1$/) groffed.should.match(/^\.Xr madeup 4$/) end it "sorts by section" do groffed = @see_also.to_groff groffed.index(/^\.Xr ruby$/).should.be < groffed.index(/^\.Xr rails 1$/) groffed.index(/^\.Xr rails 1$/).should.be < groffed.index(/^\.Xr madeup 4$/) end it "sorts within sections" do groffed = @see_also.to_groff groffed.index(/^\.Xr perl 1$/).should.be < groffed.index(/^\.Xr rails 1$/) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rtfm-0.5.2 | spec/see_also_spec.rb |
rtfm-0.5.1 | spec/see_also_spec.rb |
rtfm-0.5.0 | spec/see_also_spec.rb |