Permalink
Browse files

better method name

  • Loading branch information...
justinko committed May 12, 2011
1 parent a6d4ac5 commit ba29acb6b2d7357c4c21e2377069356b5228812c
Showing with 7 additions and 7 deletions.
  1. +2 −2 README.md
  2. +1 −1 lib/sunspot/rails/tester.rb
  3. +4 −4 spec/sunspot/rails/tester_spec.rb
View
@@ -16,7 +16,7 @@ Here is an example RSpec 2 spec_helper.rb:
end
config.before :solr => true do
- Sunspot::Rails::Tester.fork_original_sunspot_session
+ Sunspot::Rails::Tester.start_original_sunspot_session
Sunspot.session = $original_sunspot_session
Sunspot.remove_all!
end
@@ -34,7 +34,7 @@ Let's go through what the above code does.
* In the second `before` block, we use RSpec 2's metadata feature by
adding `:solr => true`. Any example or example group with this metadata
will run the _original_ sunspot session.
- `Sunspot::Rails::Tester.fork_original_sunspot_session` starts the solr instance
+ `Sunspot::Rails::Tester.start_original_sunspot_session` starts the solr instance
if it's not running.
Here is an example spec that utilizes sunspot-rails-tester:
@@ -11,7 +11,7 @@ class << self
attr_accessor :server, :started, :pid
- def fork_original_sunspot_session
+ def start_original_sunspot_session
unless started?
self.server = Sunspot::Rails::Server.new
self.started = Time.now
@@ -5,7 +5,7 @@ module Rails
describe Tester do
let(:tester) { described_class }
- describe '.fork_original_sunspot_session' do
+ describe '.start_original_sunspot_session' do
let(:server) { double('sunspot_rails_server') }
let(:pid) { 5555 }
@@ -19,17 +19,17 @@ module Rails
after { tester.clear }
it 'sets the "server" attribute' do
- tester.fork_original_sunspot_session
+ tester.start_original_sunspot_session
tester.server.should eq(server)
end
it 'sets the "started" attribute' do
- tester.fork_original_sunspot_session
+ tester.start_original_sunspot_session
tester.started.should be_an_instance_of(Time)
end
it 'sets the "pid" attribute' do
- tester.fork_original_sunspot_session
+ tester.start_original_sunspot_session
tester.pid.should eq(pid)
end
end

0 comments on commit ba29acb

Please sign in to comment.