Permalink
Browse files

Rails 3.0.2 seems to hate using .count on a returned set, so using .l…

…ength instead.
  • Loading branch information...
1 parent 6c102ce commit 99717392da40877039d790a6d07c1ca3b43bf3b4 @parndt parndt committed Nov 15, 2010
Showing with 7 additions and 7 deletions.
  1. +1 −1 lib/gemspec.rb
  2. +1 −1 readme.md
  3. +2 −2 refinerycms-inquiries.gemspec
  4. +3 −3 spec/models/inquiry_spec.rb
View
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
-version = '0.9.9.3'
+version = '0.9.9.4'
raise "Could not get version so gemspec can not be built" if version.nil?
files = Dir.glob("**/*").flatten.reject do |file|
file =~ /\.gem$/
View
@@ -6,7 +6,7 @@
Include the latest [gem](http://rubygems.org/gems/refinerycms-inquiries) into your Refinery CMS application's Gemfile:
- gem "refinerycms-inquiries", '~> 0.9.9.3'
+ gem "refinerycms-inquiries", '~> 0.9.9.4'
Then type the following at command line inside your Refinery CMS application's root directory:
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|
s.name = %q{refinerycms-inquiries}
- s.version = %q{0.9.9.3}
- s.date = %q{2010-11-01}
+ s.version = %q{0.9.9.4}
+ s.date = %q{2010-11-16}
s.summary = %q{Inquiry handling functionality for the Refinery CMS project.}
s.description = %q{Inquiry handling functionality extracted from Refinery CMS to allow you to have a contact form and manage inquiries in the Refinery backend.}
s.homepage = %q{http://refinerycms.com}
@@ -41,19 +41,19 @@
it "returns latest 7 non-spam inquiries by default" do
8.times { Factory(:inquiry) }
Inquiry.last.toggle!(:spam)
- Inquiry.latest.count.should == 7
+ Inquiry.latest.length.should == 7
end
it "returns latest 7 inquiries including spam ones" do
4.times { Factory(:inquiry) }
3.times { Factory(:inquiry) }
Inquiry.all[0..2].each { |inquiry| inquiry.toggle!(:spam) }
- Inquiry.latest(7, true).count.should == 7
+ Inquiry.latest(7, true).length.should == 7
end
it "returns latest n inquiries" do
4.times { Factory(:inquiry) }
- Inquiry.latest(3).count.should == 3
+ Inquiry.latest(3).length.should == 3
end
end
end

0 comments on commit 9971739

Please sign in to comment.