mirror of
https://github.com/activerecord-hackery/ransack.git
synced 2022-11-09 13:47:45 -05:00
Use quotes and verbs consistently, improve grammar [ci skip]
This commit is contained in:
parent
a7ff25f8cb
commit
a99e3cc51e
1 changed files with 8 additions and 8 deletions
|
@ -3,14 +3,14 @@ require 'spec_helper'
|
|||
module Ransack
|
||||
describe Search do
|
||||
|
||||
describe "#initialize" do
|
||||
it "do not raise exception for string :params argument" do
|
||||
lambda { Search.new(Person, "") }.should_not raise_error
|
||||
describe '#initialize' do
|
||||
it 'does not raise exception for string :params argument' do
|
||||
lambda { Search.new(Person, '') }.should_not raise_error
|
||||
end
|
||||
end
|
||||
|
||||
describe '#build' do
|
||||
it 'creates Conditions for top-level attributes' do
|
||||
it 'creates conditions for top-level attributes' do
|
||||
search = Search.new(Person, :name_eq => 'Ernie')
|
||||
condition = search.base[:name_eq]
|
||||
condition.should be_a Nodes::Condition
|
||||
|
@ -19,7 +19,7 @@ module Ransack
|
|||
condition.value.should eq 'Ernie'
|
||||
end
|
||||
|
||||
it 'creates Conditions for association attributes' do
|
||||
it 'creates conditions for association attributes' do
|
||||
search = Search.new(Person, :children_name_eq => 'Ernie')
|
||||
condition = search.base[:children_name_eq]
|
||||
condition.should be_a Nodes::Condition
|
||||
|
@ -28,7 +28,7 @@ module Ransack
|
|||
condition.value.should eq 'Ernie'
|
||||
end
|
||||
|
||||
it 'creates Conditions for polymorphic belongs_to association attributes' do
|
||||
it 'creates conditions for polymorphic belongs_to association attributes' do
|
||||
search = Search.new(Note, :notable_of_Person_type_name_eq => 'Ernie')
|
||||
condition = search.base[:notable_of_Person_type_name_eq]
|
||||
condition.should be_a Nodes::Condition
|
||||
|
@ -37,7 +37,7 @@ module Ransack
|
|||
condition.value.should eq 'Ernie'
|
||||
end
|
||||
|
||||
it 'creates Conditions for multiple polymorphic belongs_to association attributes' do
|
||||
it 'creates conditions for multiple polymorphic belongs_to association attributes' do
|
||||
search = Search.new(Note,
|
||||
:notable_of_Person_type_name_or_notable_of_Article_type_title_eq => 'Ernie')
|
||||
condition = search
|
||||
|
@ -109,7 +109,7 @@ module Ransack
|
|||
.should eq [Nodes::Condition, Nodes::Condition]
|
||||
end
|
||||
|
||||
it 'creates Conditions for custom predicates that take arrays' do
|
||||
it 'creates conditions for custom predicates that take arrays' do
|
||||
Ransack.configure do |config|
|
||||
config.add_predicate 'ary_pred', :wants_array => true
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue