forked from kjvarga/sitemap_generator
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
33 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,44 +1,18 @@ | ||
ENV['RAILS_ENV'] ||= 'test' | ||
require "bundler/setup" | ||
|
||
# sitemap_rails = | ||
# case ENV["SITEMAP_RAILS"] | ||
# when 'rails3' | ||
# "mock_rails3_gem" | ||
# when 'gem', 'plugin' | ||
# "mock_app_#{ENV["SITEMAP_RAILS"]}" | ||
# else | ||
# "mock_app_gem" | ||
# end | ||
# | ||
# ENV["RAILS_ENV"] ||= 'test' | ||
# ENV['BUNDLE_GEMFILE'] = File.join(File.dirname(__FILE__), sitemap_rails, 'Gemfile') | ||
# | ||
# # Load the app's Rakefile so we know everything is being loaded correctly | ||
# load(File.join(File.dirname(__FILE__), sitemap_rails, 'Rakefile')) | ||
Bundler.require | ||
require 'rspec/autorun' | ||
|
||
# Requires supporting files with custom matchers and macros, etc, | ||
# in ./support/ and its subdirectories. | ||
Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f} | ||
|
||
require 'sitemap_generator' | ||
|
||
Spec::Runner.configure do |config| | ||
RSpec.configure do |config| | ||
config.mock_with :mocha | ||
config.include(FileMacros) | ||
config.include(XmlMacros) | ||
end | ||
|
||
module Helpers | ||
extend self | ||
|
||
# Invoke and then re-enable the task so it can be called multiple times. | ||
# KJV: Tasks are only being run once despite being re-enabled. | ||
# | ||
# <tt>task</tt> task symbol/string | ||
def invoke_task(task) | ||
Rake.send(:verbose, false) | ||
Rake::Task[task.to_s].invoke | ||
Rake::Task[task.to_s].reenable | ||
end | ||
# Pass :focus option to +describe+ or +it+ to run that spec only | ||
config.treat_symbols_as_metadata_keys_with_true_values = true | ||
config.filter_run :focus => true | ||
config.run_all_when_everything_filtered = true | ||
end |