Skip to content

Commit

Permalink
Rails 3.0.2 seems to hate using .count on a returned set, so using .l…
Browse files Browse the repository at this point in the history
…ength instead.
  • Loading branch information
parndt committed Nov 15, 2010
1 parent 6c102ce commit 9971739
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/gemspec.rb
@@ -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$/
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Expand Up @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions refinerycms-inquiries.gemspec
@@ -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}
Expand Down
6 changes: 3 additions & 3 deletions spec/models/inquiry_spec.rb
Expand Up @@ -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.