Sha256: 7daf51ff2d6712a6679da628d6cbdb38a4cca08f0b6baaa64b1a627130106e8c

Contents?: true

Size: 1.22 KB

Versions: 17

Compression:

Stored size: 1.22 KB

Contents

require '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 1.10 if using 1.10-beta" do
      @controller.stub!(:` => 'Sphinx 1.10-beta (r2420)')
      @controller.sphinx_version.should == '1.10-beta'
    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

17 entries across 17 versions & 1 rubygems

Version Path
riddle-1.5.11 spec/riddle/controller_spec.rb
riddle-1.5.10 spec/riddle/controller_spec.rb
riddle-1.5.9 spec/riddle/controller_spec.rb
riddle-1.5.8 spec/riddle/controller_spec.rb
riddle-1.5.7 spec/riddle/controller_spec.rb
riddle-1.5.6 spec/riddle/controller_spec.rb
riddle-1.5.5 spec/riddle/controller_spec.rb
riddle-1.5.4 spec/riddle/controller_spec.rb
riddle-1.5.3 spec/riddle/controller_spec.rb
riddle-1.5.2 spec/riddle/controller_spec.rb
riddle-1.5.1 spec/riddle/controller_spec.rb
riddle-1.5.0 spec/riddle/controller_spec.rb
riddle-1.4.0 spec/riddle/controller_spec.rb
riddle-1.3.3 spec/riddle/controller_spec.rb
riddle-1.3.2 spec/riddle/controller_spec.rb
riddle-1.3.1 spec/riddle/controller_spec.rb
riddle-1.3.0 spec/riddle/controller_spec.rb