Sha256: 892a39c82cf63671475a63db90b66971fd276dc7c851400fda4f8d1b6d4e6831

Contents?: true

Size: 616 Bytes

Versions: 13

Compression:

Stored size: 616 Bytes

Contents

require 'spec/spec_helper'

describe Riddle do
  describe '.version_warning' do
    before :each do
      @existing_version = Riddle.loaded_version
    end
    
    after :each do
      Riddle.loaded_version = @existing_version
    end
    
    it "should do nothing if there is a Sphinx version loaded" do
      STDERR.should_not_receive(:puts)
      
      Riddle.loaded_version = '0.9.8'
      Riddle.version_warning
    end
    
    it "should output a warning if no version is loaded" do
      STDERR.should_receive(:puts)
      
      Riddle.loaded_version = nil
      Riddle.version_warning
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
riddle-1.2.2 spec/riddle_spec.rb
riddle-1.2.1 spec/riddle_spec.rb
riddle-1.2.0 spec/riddle_spec.rb
riddle-1.1.0 spec/riddle_spec.rb
riddle-1.0.12 spec/riddle_spec.rb
riddle-1.0.11 spec/riddle_spec.rb
riddle-1.0.10 spec/riddle_spec.rb
riddle-1.0.9 spec/riddle_spec.rb
riddle-1.0.8 spec/riddle_spec.rb
riddle-1.0.7 spec/riddle_spec.rb
riddle-1.0.6 spec/riddle_spec.rb
riddle-1.0.5 spec/riddle_spec.rb
riddle-1.0.4 spec/riddle_spec.rb