Sha256: 712c6f6f754f862c60be95701aa5824811d686a58f2042648a2dab5b77e817ee

Contents?: true

Size: 1.15 KB

Versions: 19

Compression:

Stored size: 1.15 KB

Contents

require 'spec/spec_helper'

describe ThinkingSphinx::AutoVersion do
  describe '.detect' do
    before :each do
      @controller = ThinkingSphinx::Configuration.instance.controller
    end
    
    it "should require 0.9.8 if that is the detected version" do
      ThinkingSphinx::AutoVersion.should_receive(:require).
        with('riddle/0.9.8')
      
      @controller.stub!(:sphinx_version => '0.9.8')
      ThinkingSphinx::AutoVersion.detect
    end
    
    it "should require 0.9.9 if that is the detected version" do
      ThinkingSphinx::AutoVersion.should_receive(:require).
        with('riddle/0.9.9')
      
      @controller.stub!(:sphinx_version => '0.9.9')
      ThinkingSphinx::AutoVersion.detect
    end
    
    it "should output a warning if the detected version is something else" do
      STDERR.should_receive(:puts)
      
      @controller.stub!(:sphinx_version => '0.9.7')
      ThinkingSphinx::AutoVersion.detect
    end
    
    it "should output a warning if the version cannot be determined" do
      STDERR.should_receive(:puts)
      
      @controller.stub!(:sphinx_version => nil)
      ThinkingSphinx::AutoVersion.detect
    end
  end
end

Version data entries

19 entries across 19 versions & 5 rubygems

Version Path
skalee-thinking-sphinx-1.3.14.2 spec/thinking_sphinx/auto_version_spec.rb
skalee-thinking-sphinx-1.3.14.1 spec/thinking_sphinx/auto_version_spec.rb
hawkerb-thinking-sphinx-1.3.18 spec/thinking_sphinx/auto_version_spec.rb
hawkerb-thinking-sphinx-1.3.17 spec/thinking_sphinx/auto_version_spec.rb
thinking-sphinx-1.3.15 spec/thinking_sphinx/auto_version_spec.rb
hawkerb-thinking-sphinx-1.3.16 spec/thinking_sphinx/auto_version_spec.rb
hawkerb-thinking-sphinx-1.3.15 spec/thinking_sphinx/auto_version_spec.rb
hawkerb-thinking-sphinx-1.3.14 spec/thinking_sphinx/auto_version_spec.rb
zipme-thinking-sphinx-1.3.14 spec/thinking_sphinx/auto_version_spec.rb
thinking-sphinx-1.3.14 spec/thinking_sphinx/auto_version_spec.rb
warp-thinking-sphinx-1.3.13 spec/thinking_sphinx/auto_version_spec.rb
thinking-sphinx-1.3.13 spec/thinking_sphinx/auto_version_spec.rb
thinking-sphinx-1.3.12 spec/thinking_sphinx/auto_version_spec.rb
thinking-sphinx-1.3.11 spec/thinking_sphinx/auto_version_spec.rb
warp-thinking-sphinx-1.3.11 spec/thinking_sphinx/auto_version_spec.rb
warp-thinking-sphinx-1.3.10 spec/thinking_sphinx/auto_version_spec.rb
thinking-sphinx-1.3.10 spec/thinking_sphinx/auto_version_spec.rb
thinking-sphinx-1.3.9 spec/thinking_sphinx/auto_version_spec.rb
thinking-sphinx-1.3.8 spec/thinking_sphinx/auto_version_spec.rb