Changeset 240

Show
Ignore:
Timestamp:
04/24/08 07:03:53 (7 months ago)
Author:
eric.dumin..@gmail.com
Message:

149 examples, 8 failures, 6 pending

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/yet_another_index_structure/lib/picolena/templates/app/helpers/documents_helper.rb

    r228 r240  
    3939   
    4040  def language_icon_for(document) 
    41     (lang=document.lang) && image_tag("flags/#{lang}.png") 
     41    (lang=document.language) && image_tag("flags/#{lang}.png") 
    4242  end 
    4343   
  • branches/yet_another_index_structure/lib/picolena/templates/app/models/document.rb

    r239 r240  
    8080   
    8181  # Returns language. 
    82   def lang 
     82  def language 
    8383    from_index[:language] 
    8484  end 
  • branches/yet_another_index_structure/lib/picolena/templates/spec/models/finder_spec.rb

    r239 r240  
    5050    index=Indexer.index 
    5151    index.field_infos[:basename].boost.should > 1.0 
    52     index.field_infos[:file].boost.should > 1.0 
     52    index.field_infos[:filename].boost.should > 1.0 
    5353    index.field_infos[:filetype].boost.should > 1.0 
    5454  end 
  • branches/yet_another_index_structure/lib/picolena/templates/spec/models/plain_text_extractor_spec.rb

    r238 r240  
    3030   
    3131  it "should guess language when enough content is available" do 
    32     Document.new("spec/test_dirs/indexed/lang/goethe").lang.should == "de" 
    33     Document.new("spec/test_dirs/indexed/lang/shakespeare").lang.should == "en" 
    34     Document.new("spec/test_dirs/indexed/lang/lorca").lang.should == "es" 
    35     Document.new("spec/test_dirs/indexed/lang/hugo").lang.should == "fr" 
     32    Document.new("spec/test_dirs/indexed/lang/goethe").language.should == "de" 
     33    Document.new("spec/test_dirs/indexed/lang/shakespeare").language.should == "en" 
     34    Document.new("spec/test_dirs/indexed/lang/lorca").language.should == "es" 
     35    Document.new("spec/test_dirs/indexed/lang/hugo").language.should == "fr" 
    3636  end 
    3737   
    3838  it "should not try to guess language when file is too small" do 
    39     Document.new("spec/test_dirs/indexed/basic/hello.rb").lang.should be_empty 
    40     Document.new("spec/test_dirs/indexed/README").lang.should be_empty 
     39    Document.new("spec/test_dirs/indexed/basic/hello.rb").language.should be_empty 
     40    Document.new("spec/test_dirs/indexed/README").language.should be_empty 
    4141  end 
    4242end