Skip to content

Commit

Permalink
Cleanup Rakefile and spec_helper
Browse files Browse the repository at this point in the history
Move port specification to .solr_wrapper.yml, since we only use one.

Remove unnecessary deps in spec_helper.
  • Loading branch information
atz committed Nov 3, 2016
1 parent 903d11c commit 43a926c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
3 changes: 2 additions & 1 deletion .solr_wrapper.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Place any default configuration for solr_wrapper here
# port: 8983
port: 8983
verbose: true
collection:
dir: solr/conf/
name: blacklight-core
13 changes: 3 additions & 10 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
require 'rake'

require 'bundler'
Bundler::GemHelper.install_tasks

require 'rspec/core/rake_task'

require 'engine_cart/rake_task'
require 'solr_wrapper'

EngineCart.fingerprint_proc = EngineCart.rails_fingerprint_proc

require 'solr_wrapper'

task :default => :ci

desc "Run specs"
RSpec::Core::RakeTask.new do |t|

end
RSpec::Core::RakeTask.new

task ci: ['engine_cart:generate'] do
SolrWrapper.wrap(port: '8983') do |solr|
SolrWrapper.wrap do |solr|
solr.with_collection(name: 'blacklight-core', dir: File.join(File.expand_path(File.dirname(__FILE__)), "solr", "conf")) do
Rake::Task["test:seed"].invoke
Rake::Task['spec'].invoke
Expand All @@ -28,7 +23,6 @@ task ci: ['engine_cart:generate'] do
end

namespace :test do

desc "Put sample data into solr"
task seed: ['engine_cart:generate'] do
within_test_app do
Expand All @@ -37,5 +31,4 @@ namespace :test do
system "rake blacklight_range_limit:seed"
end
end

end
9 changes: 0 additions & 9 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
require 'rubygems'
require 'bundler/setup'

ENV["RAILS_ENV"] ||= 'test'

require 'rsolr'

require 'engine_cart'
EngineCart.load_application!

require 'rspec/rails'
require 'capybara/rspec'


RSpec.configure do |config|


# rspec-rails 3 will no longer automatically infer an example group's spec type
# from the file location. You can explicitly opt-in to the feature using this
# config option.
Expand All @@ -26,4 +18,3 @@
# end
config.infer_spec_type_from_file_location!
end

0 comments on commit 43a926c

Please sign in to comment.