activerecord_random 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,4 @@
1
1
  require 'active_record' unless defined? ActiveRecord::Base
2
- require 'ext/active_record/finder_methods/random'
3
2
 
4
3
  module ActiveRecord
5
4
 
@@ -15,17 +15,4 @@ describe ActiveRecord::Random do
15
15
 
16
16
  end # Class Methods
17
17
 
18
- describe "Random finder" do
19
-
20
- it "Question.find(:random) returns a random instance of Question" do
21
- 10.times { |n| Factory.create(:question) }
22
- Question.find(:random).should be_an_instance_of Question
23
- end
24
-
25
- it "also returns nil when no records are found by the random finder" do
26
- Question.find(:random).should be_nil
27
- end
28
-
29
- end # Random finder
30
-
31
18
  end # ActiveRecord::Random
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 0
9
- version: 1.0.0
8
+ - 1
9
+ version: 1.0.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Gnomeslab, Lda.
@@ -130,7 +130,6 @@ extra_rdoc_files: []
130
130
 
131
131
  files:
132
132
  - lib/activerecord_random.rb
133
- - lib/ext/active_record/finder_methods/random.rb
134
133
  - Gemfile
135
134
  - Gemfile.lock
136
135
  - MIT-LICENSE
@@ -1,11 +0,0 @@
1
- module ActiveRecord
2
-
3
- module FinderMethods
4
-
5
- def find(*args)
6
- args == [:random] ? self.random : super(args)
7
- end
8
-
9
- end # FinderMethods
10
-
11
- end # ActiveRecord