forked from sunspot/sunspot
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some spec housekeeping. Starting a TESTING doc for sunspot_rails, upd…
…ated some gem dependencies.
- Loading branch information
Showing
6 changed files
with
44 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
*.gem | ||
Gemfile.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Testing `sunspot_rails` | ||
|
||
Note: All the paths mentioned in here are relative to the current directory, or `sunspot/sunspot_rails`. | ||
|
||
The `sunspot_rails` gem is tested with RSpec, and its spec suite is located in `spec`. | ||
|
||
These specs are to be run against up to date Rails 2 and Rails 3 applications, included at `spec/rails2` and `spec/rails3`, respectively. The `spec_helper.rb` file loads the environment for these applications based on the `RAILS_ROOT` provided when invoking tests, outlined below. | ||
|
||
## Install dependencies | ||
|
||
Each application uses Bundler to manage its dependencies. The `Gemfile` also installs the `sunspot` and `sunspot_rails` gems from your copies checked out locally. Because Bundler expands the full path to `sunspot` and `sunspot_rails`, we're excluding its generated `Gemfile.lock` file from version control. | ||
|
||
cd spec/rails2 | ||
bundle install | ||
cd ../rails3 | ||
bundle install | ||
cd ../../ | ||
|
||
## Invoke specs | ||
|
||
BUNDLE_GEMFILE=spec/rails2/Gemfile RAILS_ROOT=spec/rails2/ bundle exec spec spec/ | ||
BUNDLE_GEMFILE=spec/rails3/Gemfile RAILS_ROOT=spec/rails3/ bundle exec rspec spec/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
source :rubygems | ||
|
||
gem 'rails', '= 2.3.4' | ||
gem 'rails', '~> 2.3.8' | ||
gem 'sqlite3-ruby', '~> 1.3.1' | ||
|
||
gem 'sunspot', :path => File.expand_path('../../../../sunspot', __FILE__) | ||
gem 'sunspot_rails', :path => File.expand_path('../../..', __FILE__) | ||
gem 'sqlite3-ruby', '~> 1.3.1' | ||
|
||
group :test do | ||
gem 'rspec-rails', '~> 1.3.0' | ||
gem 'ruby-debug', :require => nil | ||
|
||
if RUBY_VERSION.to_f >= 1.9 | ||
gem 'ruby-debug19', :require => nil | ||
gem 'test-unit', '1.2.3' | ||
else | ||
gem 'ruby-debug', :require => nil | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
source :rubygems | ||
|
||
gem 'rails', '= 3.0.0.beta4' | ||
gem 'rails', '~> 3.0.0' | ||
gem 'sunspot', :path => File.expand_path('../../../../sunspot', __FILE__) | ||
gem 'sunspot_rails', :path => File.expand_path('../../..', __FILE__) | ||
gem 'sqlite3-ruby', '~> 1.3.1' | ||
|
||
group :test do | ||
gem 'rspec-rails', '= 2.0.0.beta.19' | ||
gem 'ruby-debug', :require => nil | ||
gem 'rspec-rails', '~> 2.0.0.beta.22' | ||
|
||
if RUBY_VERSION.to_f >= 1.9 | ||
gem 'ruby-debug19', :require => nil | ||
gem 'test-unit', '1.2.3' | ||
else | ||
gem 'ruby-debug', :require => nil | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.