Sha256: ee688c88f069aa9ebb0eec8884b426c526485dcf6f4daa10c19e566707687679
Contents?: true
Size: 973 Bytes
Versions: 1
Compression:
Stored size: 973 Bytes
Contents
require 'spec_helper' require 'sitemap_generator/interpreter' describe SitemapGenerator::Interpreter do # The interpreter doesn't have the URL helpers included for some reason, so it # fails when adding links. That messes up later specs unless we reset the sitemap object. after :all do SitemapGenerator::Sitemap.reset! end it "should find the config file if Rails.root doesn't end in a slash" do SitemapGenerator::Utilities.with_warnings(nil) do Rails = stub(:root => SitemapGenerator.app.root.to_s.sub(/\/$/, '')) end # Rails.expects(:root).returns(rails_root).at_least_once lambda { SitemapGenerator::Interpreter.run }.should_not raise_exception(Errno::ENOENT) end it "should set the verbose option" do SitemapGenerator::Interpreter.any_instance.expects(:instance_eval) interpreter = SitemapGenerator::Interpreter.run(:verbose => true) interpreter.instance_variable_get(:@linkset).verbose.should be_true end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sitemap_generator-3.0.0 | spec/sitemap_generator/interpreter_spec.rb |