fixes brittle chain initialization spec

pull/6827/head
jwollert 14 years ago
parent 9294e22be1
commit 5851790225
  1. 4
      spec/models/cost_query/chaining_spec.rb
  2. 6
      spec/models/cost_query/filter_spec.rb

@ -22,6 +22,10 @@ describe CostQuery do
CostQuery.chain_initializer.clear
end
after(:all) do
CostQuery.chain_initializer.clear
end
it "should contain NoFilter" do
@query.chain.should be_a(CostQuery::Filter::NoFilter)
end

@ -106,7 +106,7 @@ describe CostQuery do
@query.filter "author_id", :value => object.id
@query.result.count.should == Entry.all.select { |i| i.issue and i.issue.author == object }.count
end
end\
end
it "filters spent_on" do
@query.filter :spent_on, :operator=> 'w'
@ -233,12 +233,12 @@ describe CostQuery do
before do
CostQuery::Filter.all.merge CostQuery::Filter::CustomField.all
end
it "should create classes for custom fields" do
# Would raise a name error
CostQuery::Filter::CustomFieldSearchableField
end
it "includes custom fields classes in CustomField.all" do
CostQuery::Filter::CustomField.all.
should include(CostQuery::Filter::CustomFieldSearchableField)

Loading…
Cancel
Save