Sha256: f2f068cfce0a702b4b06dafdb6e33399da7918c7b69afe47470820ba545738ab

Contents?: true

Size: 1.05 KB

Versions: 5

Compression:

Stored size: 1.05 KB

Contents

require 'spec/spec_helper'

describe Riddle::Controller do
  describe '#sphinx_version' do
    before :each do
      @controller = Riddle::Controller.new stub('controller'), 'sphinx.conf'
    end
    
    it "should return 0.9.9 if using 0.9.9" do
      @controller.stub!(:` => 'Sphinx 0.9.9-release (r2117)')
      @controller.sphinx_version.should == '0.9.9'
    end
    
    it "should return 0.9.9 if using 0.9.9 rc2" do
      @controller.stub!(:` => 'Sphinx 0.9.9-rc2 (r1785)')
      @controller.sphinx_version.should == '0.9.9'
    end
    
    it "should return 0.9.9 if using 0.9.9 rc1" do
      @controller.stub!(:` => 'Sphinx 0.9.9-rc1 (r1566)')
      @controller.sphinx_version.should == '0.9.9'
    end
    
    it "should return 0.9.8 if using 0.9.8.1" do
      @controller.stub!(:` => 'Sphinx 0.9.8.1-release (r1533)')
      @controller.sphinx_version.should == '0.9.8'
    end
    
    it "should return 0.9.8 if using 0.9.8" do
      @controller.stub!(:` => 'Sphinx 0.9.8-release (r1371)')
      @controller.sphinx_version.should == '0.9.8'
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
riddle-1.0.11 spec/riddle/controller_spec.rb
riddle-1.0.10 spec/riddle/controller_spec.rb
riddle-1.0.9 spec/riddle/controller_spec.rb
riddle-1.0.8 spec/riddle/controller_spec.rb
riddle-1.0.7 spec/riddle/controller_spec.rb