-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Have generators create wrapper config files for test
- Loading branch information
Showing
7 changed files
with
67 additions
and
0 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
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
4 changes: 4 additions & 0 deletions
4
lib/generators/active_fedora/config/fedora/templates/fcrepo_wrapper_test.yml
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,4 @@ | ||
#config/fcrepo_wrapper_test.yml.sample | ||
port: 8986 | ||
enable_jms: false | ||
fcrepo_home_dir: tmp/fcrepo4-test-data |
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
8 changes: 8 additions & 0 deletions
8
lib/generators/active_fedora/config/solr/templates/solr_wrapper_test.yml
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,8 @@ | ||
#config/solr_wrapper_test.yml | ||
# version: 6.0.0 | ||
port: 8985 | ||
instance_dir: tmp/solr-test | ||
collection: | ||
persist: false | ||
dir: solr/config | ||
name: hydra-test |
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,26 @@ | ||
require 'spec_helper' | ||
require 'generators/active_fedora/config/fedora/fedora_generator' | ||
|
||
describe ActiveFedora::Config::FedoraGenerator do | ||
describe "#fcrepo_wrapper_config" do | ||
let(:generator) { described_class.new } | ||
let(:files_to_test) {[ | ||
'config/fcrepo_wrapper_test.yml', | ||
'.fcrepo_wrapper' | ||
]} | ||
|
||
before do | ||
generator.fcrepo_wrapper_config | ||
end | ||
|
||
after do | ||
files_to_test.each { |file| File.delete(file) if File.exist?(file) } | ||
end | ||
|
||
it "creates config files" do | ||
files_to_test.each do |file| | ||
expect(File).to exist(file), "Expected #{file} to exist" | ||
end | ||
end | ||
end | ||
end |
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,26 @@ | ||
require 'spec_helper' | ||
require 'generators/active_fedora/config/solr/solr_generator' | ||
|
||
describe ActiveFedora::Config::SolrGenerator do | ||
describe "#solr_wrapper_config" do | ||
let(:generator) { described_class.new } | ||
let(:files_to_test) {[ | ||
'config/solr_wrapper_test.yml', | ||
'.solr_wrapper' | ||
]} | ||
|
||
before do | ||
generator.solr_wrapper_config | ||
end | ||
|
||
after do | ||
files_to_test.each { |file| File.delete(file) if File.exist?(file) } | ||
end | ||
|
||
it "creates config files" do | ||
files_to_test.each do |file| | ||
expect(File).to exist(file), "Expected #{file} to exist" | ||
end | ||
end | ||
end | ||
end |