Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed test that got broken by commit 859cc1d 'remove redundent spaces'
  • Loading branch information
abenari committed Jun 15, 2011
1 parent 581fd79 commit 7c67e9c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions spec/integration/auto_complete_spec.rb
Expand Up @@ -47,15 +47,15 @@ class ::Bar < ActiveRecord::Base; belongs_to :foo; end
end

it "should complete the string comparators" do
Foo.complete_for('string ').should =~ (["string != ", "string !~ ", "string = ", "string ~ "])
Foo.complete_for('string ').should =~ (["string != ", "string !~ ", "string = ", "string ~ "])
end

it "should complete the numerical comparators" do
Foo.complete_for('int ').should =~ (["int != ", "int < ", "int <= ", "int = ", "int > ", "int >= "])
Foo.complete_for('int ').should =~ (["int != ", "int < ", "int <= ", "int = ", "int > ", "int >= "])
end

it "should complete the temporal (date) comparators" do
Foo.complete_for('date ').should =~ (["date = ", "date < ", "date > "])
Foo.complete_for('date ').should =~ (["date = ", "date < ", "date > "])
end

it "should raise error for unindexed field" do
Expand All @@ -67,11 +67,11 @@ class ::Bar < ActiveRecord::Base; belongs_to :foo; end
end

it "should complete logical comparators" do
Foo.complete_for('string ~ fo ').should contain("string ~ fo and", "string ~ fo or")
Foo.complete_for('string ~ fo ').should contain("string ~ fo and", "string ~ fo or")
end

it "should complete prefix operators" do
Foo.complete_for(' ').should contain(" has", " not")
Foo.complete_for(' ').should contain(" has", " not")
end

it "should not complete logical infix operators" do
Expand All @@ -95,7 +95,7 @@ class ::Bar < ActiveRecord::Base; belongs_to :foo; end
end

it "should complete values should contain baz" do
Foo.complete_for('explicit = ').should contain('explicit = baz')
Foo.complete_for('explicit = ').should contain('explicit = baz')
end
end

Expand All @@ -112,19 +112,19 @@ class ::Bar < ActiveRecord::Base; belongs_to :foo; end
context 'using null prefix operators queries' do

it "should complete has operator" do
Foo.complete_for('has strin').should eql(['has string '])
Foo.complete_for('has strin').should eql(['has string '])
end

it "should complete null? operator" do
Foo.complete_for('null? st').should eql(['null? string '])
Foo.complete_for('null? st').should eql(['null? string '])
end

it "should complete set? operator" do
Foo.complete_for('set? exp').should eql(['set? explicit '])
Foo.complete_for('set? exp').should eql(['set? explicit '])
end

it "should complete null? operator for explicit field" do
Foo.complete_for('null? explici').should eql(['null? explicit '])
Foo.complete_for('null? explici').should eql(['null? explicit '])
end

it "should not complete comparators after prefix statement" do
Expand Down

0 comments on commit 7c67e9c

Please sign in to comment.