Sha256: 6dfc97cb44d7ed5a3cd176f16ffed204101843b0a325e5f063b307e8d25fe63c

Contents?: true

Size: 1.88 KB

Versions: 7

Compression:

Stored size: 1.88 KB

Contents

require 'spec/spec_helper'

describe ThinkingSphinx::Index::FauxColumn do
  it "should use the last argument as the name, with preceeding ones going into the stack" do
    #
  end
  
  it "should access the name through __name" do
    #
  end
  
  it "should access the stack through __stack" do
    #
  end
  
  it "should return true from is_string? if the name is a string and the stack is empty" do
    #
  end
  
  describe "coerce class method" do
    before :each do
      @column = ThinkingSphinx::Index::FauxColumn.stub_instance
      ThinkingSphinx::Index::FauxColumn.stub_method(:new => @column)
    end
    
    it "should return a single faux column if passed a string" do
      ThinkingSphinx::Index::FauxColumn.coerce("string").should == @column
    end
    
    it "should return a single faux column if passed a symbol" do
      ThinkingSphinx::Index::FauxColumn.coerce(:string).should == @column
    end
    
    it "should return an array of faux columns if passed an array of strings" do
      ThinkingSphinx::Index::FauxColumn.coerce(["one", "two"]).should == [
        @column, @column
      ]
    end
    
    it "should return an array of faux columns if passed an array of symbols" do
      ThinkingSphinx::Index::FauxColumn.coerce([:one, :two]).should == [
        @column, @column
      ]
    end
  end
  
  describe "method_missing calls with no arguments" do
    it "should push any further method calls into name, and the old name goes into the stack" do
      #
    end
    
    it "should return itself" do
      #
    end
  end
  
  describe "method_missing calls with one argument" do
    it "should act as if calling method missing with method, then argument" do
      #
    end
  end
  
  describe "method_missing calls with more than one argument" do
    it "should return a collection of Faux Columns sharing the same stack, but with each argument as the name" do
      #
    end
  end
end

Version data entries

7 entries across 7 versions & 5 rubygems

Version Path
DrMark-thinking-sphinx-0.9.9 spec/unit/thinking_sphinx/index/faux_column_spec.rb
freelancing-god-thinking-sphinx-0.9.10 spec/unit/thinking_sphinx/index/faux_column_spec.rb
freelancing-god-thinking-sphinx-0.9.11 spec/unit/thinking_sphinx/index/faux_column_spec.rb
freelancing-god-thinking-sphinx-0.9.12 spec/unit/thinking_sphinx/index/faux_column_spec.rb
jaikoo-thinking-sphinx-0.9.10 spec/unit/thinking_sphinx/index/faux_column_spec.rb
ryanb-thinking-sphinx-0.9.8 spec/unit/thinking_sphinx/index/faux_column_spec.rb
ryanb-thinking_sphinx-0.9.8 spec/unit/thinking_sphinx/index/faux_column_spec.rb