Sha256: 713a892a89e30af46b1a4fbd31499258d71e6c9c038da759c6c553ac6d583fe0

Contents?: true

Size: 1.15 KB

Versions: 8

Compression:

Stored size: 1.15 KB

Contents

# this comment should never be shown
module M
 def go_here
   345
 end
end

class A
 def self.inspect 
    "A(id: integer, b: integer)"
 end
 # this should never be shown with go2
 def go
  33
 end
 # some suh-weet rdoc
 def self.go2
   34
 end
 
 include M
end



class B
 def self.go2
    35
 end
end

=begin
doctest: should parse funky inspect classes [railsy], too

doctest_require: '../lib/ri_for'
>> $VERBOSE = true
>> A.ri_for(:go, :want_the_description_returned => true).join('..')
>> A.ri_for(:go2, :want_the_description_returned => true).join('..')
>> B.ri_for(:go2, :want_the_description_returned => true).join('..').include?('35')
=> true
>> RUBY_VERSION > '1.8' || A.ri_for(:go2, :want_the_description_returned => true).join('..').include?('suh-weet rdoc')
=> true
>> A.ri_for(:go2, :want_the_description_returned => true).join('..').include? 'never be shown'
=> false

# dual whammy... TODO do these test provide full coverage?

>> RUBY_VERSION > '1.8' || A.ri_for(:go_here, :want_the_description_returned => true).join('..').include?('345')
>> RUBY_VERSION > '1.8' || A.ri_for(:go_here, :want_the_description_returned => true).join('..').include?('345')

=end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ri_for-0.6.1 test/rubydoctest.big.rb
ri_for-0.6.0 test/rubydoctest.big.rb
ri_for-0.5.1 test/rubydoctest.big.rb
ri_for-0.5.0 test/test_big_name.rb
ri_for-0.4.1 test/test_big_name.rb
ri_for-0.4.0 test/test_big_name.rb
ri_for-0.3.1 test/test_big_name.rb
ri_for-0.3.0 test/test_big_name.rb