Permalink
Browse files

changed method name to 'searchable' from 'sunspot_setup'

  • Loading branch information...
1 parent 0de9160 commit 19bae34936370e44d0557141f40bcce002eb0ece @jugyo committed Jul 5, 2010
Showing with 7 additions and 7 deletions.
  1. +1 −1 README.md
  2. +1 −1 examples/example.rb
  3. +1 −1 lib/sunspot/mongoid.rb
  4. +4 −4 test/test_sunspot_mongoid.rb
View
@@ -20,7 +20,7 @@ Example
field :title
include Sunspot::Mongoid
- sunspot_setup do
+ searchable do
text :title
end
end
View
@@ -11,7 +11,7 @@ class Post
field :title
include Sunspot::Mongoid
- sunspot_setup do
+ searchable do
text :title
end
end
View
@@ -15,7 +15,7 @@ def self.included(base)
extend Sunspot::Rails::Searchable::ClassMethods
include Sunspot::Rails::Searchable::InstanceMethods
- def self.sunspot_setup(options = {}, &block)
+ def self.searchable(options = {}, &block)
Sunspot.setup(self, &block)
class_inheritable_hash :sunspot_options
@@ -9,7 +9,7 @@ class Foo
field :title
include Sunspot::Mongoid
- sunspot_setup do
+ searchable do
text :title
end
end
@@ -19,7 +19,7 @@ class Bar
field :title
include Sunspot::Mongoid
- sunspot_setup(:auto_index => false, :auto_remove => false) do
+ searchable(:auto_index => false, :auto_remove => false) do
text :title
end
end
@@ -30,9 +30,9 @@ class Bar
assert Bar.sunspot_options == {:auto_index=>false, :auto_remove=>false, :include=>[]}
end
- should 'be called Sunspot.setup when call Foo.sunspot_setup' do
+ should 'be called Sunspot.setup when call Foo.searchable' do
mock(Sunspot).setup(Foo)
- Foo.sunspot_setup
+ Foo.searchable
end
should 'get as text_fields from Sunspot::Setup' do

0 comments on commit 19bae34

Please sign in to comment.