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. 2
      spec/models/cost_query/filter_spec.rb

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

@ -106,7 +106,7 @@ describe CostQuery do
@query.filter "author_id", :value => object.id @query.filter "author_id", :value => object.id
@query.result.count.should == Entry.all.select { |i| i.issue and i.issue.author == object }.count @query.result.count.should == Entry.all.select { |i| i.issue and i.issue.author == object }.count
end end
end\ end
it "filters spent_on" do it "filters spent_on" do
@query.filter :spent_on, :operator=> 'w' @query.filter :spent_on, :operator=> 'w'

Loading…
Cancel
Save