nanoc 4.7.10 → 4.7.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CONTRIBUTING.md +17 -0
- data/.github/ISSUE_TEMPLATE.md +23 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +18 -0
- data/.gitignore +8 -0
- data/.rspec +3 -0
- data/.rubocop.yml +174 -0
- data/.travis.yml +27 -0
- data/Gemfile +4 -3
- data/NEWS.md +11 -0
- data/Rakefile +5 -2
- data/lib/nanoc/base/entities/dependency.rb +5 -3
- data/lib/nanoc/base/entities/layout.rb +1 -1
- data/lib/nanoc/base/repos/dependency_store.rb +64 -28
- data/lib/nanoc/base/services/dependency_tracker.rb +1 -1
- data/lib/nanoc/base/views/config_view.rb +4 -0
- data/lib/nanoc/checking/checks/external_links.rb +3 -6
- data/lib/nanoc/cli.rb +0 -2
- data/lib/nanoc/cli/commands/shell.rb +2 -3
- data/lib/nanoc/filters/colorize_syntax/colorizers.rb +4 -1
- data/lib/nanoc/telemetry/table.rb +1 -1
- data/lib/nanoc/version.rb +1 -1
- data/nanoc.gemspec +1 -5
- data/scripts/release +95 -0
- data/{test → spec/nanoc}/base/core_ext/array_spec.rb +5 -14
- data/{test → spec/nanoc}/base/core_ext/hash_spec.rb +6 -15
- data/{test → spec/nanoc}/base/core_ext/pathname_spec.rb +0 -0
- data/spec/nanoc/base/core_ext/string_spec.rb +23 -0
- data/spec/nanoc/base/directed_graph_spec.rb +291 -0
- data/spec/nanoc/base/entities/identifiable_collection_spec.rb +56 -0
- data/spec/nanoc/base/entities/item_spec.rb +8 -0
- data/spec/nanoc/base/entities/layout_spec.rb +8 -0
- data/spec/nanoc/base/repos/dependency_store_spec.rb +166 -21
- data/spec/nanoc/base/views/config_view_spec.rb +29 -1
- data/spec/nanoc/cli/commands/shell_spec.rb +23 -8
- data/spec/nanoc/filters/less_spec.rb +1 -1
- data/spec/nanoc/regressions/gh_1185_spec.rb +22 -0
- data/spec/nanoc/telemetry/table_spec.rb +22 -0
- data/spec/spec_helper.rb +5 -6
- data/test/base/test_item_array.rb +0 -35
- data/test/checking/checks/test_external_links.rb +0 -14
- data/test/filters/test_coffeescript.rb +0 -2
- data/test/filters/test_handlebars.rb +0 -4
- data/test/filters/test_uglify_js.rb +0 -4
- data/test/helper.rb +0 -6
- data/test/helpers/test_blogging.rb +66 -26
- data/test/helpers/test_xml_sitemap.rb +23 -7
- metadata +16 -9
- data/Gemfile.lock +0 -433
- data/test/base/core_ext/string_spec.rb +0 -25
- data/test/base/test_item.rb +0 -40
- data/test/base/test_layout.rb +0 -16
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
describe Nanoc::Filters::Less, site: true, stdio: true
|
3
|
+
describe Nanoc::Filters::Less, site: true, stdio: true do
|
4
4
|
# These tests are high-level in order to interact well with the compiler. This is important for
|
5
5
|
# this :less filter, because of the way it handles fibers.
|
6
6
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
describe 'GH-1185', site: true, stdio: true do
|
4
|
+
before do
|
5
|
+
File.write('content/foo.html', 'stuff')
|
6
|
+
|
7
|
+
File.write('Rules', <<~EOS)
|
8
|
+
preprocess do
|
9
|
+
@items['/foo.*'].identifier = '/bar.html'
|
10
|
+
end
|
11
|
+
|
12
|
+
compile '/**/*' do
|
13
|
+
filter :erb
|
14
|
+
write ext: 'html'
|
15
|
+
end
|
16
|
+
EOS
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'does not crash' do
|
20
|
+
Nanoc::CLI.run(%w[compile])
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
describe Nanoc::Telemetry::Table do
|
4
|
+
let(:table) { described_class.new(rows) }
|
5
|
+
|
6
|
+
let(:rows) do
|
7
|
+
[
|
8
|
+
%w[name awesomeness],
|
9
|
+
%w[denis high],
|
10
|
+
%w[REDACTED low],
|
11
|
+
]
|
12
|
+
end
|
13
|
+
|
14
|
+
example do
|
15
|
+
expect(table.to_s).to eq(<<~EOS.rstrip)
|
16
|
+
name │ awesomeness
|
17
|
+
─────────┼────────────
|
18
|
+
denis │ high
|
19
|
+
REDACTED │ low
|
20
|
+
EOS
|
21
|
+
end
|
22
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -12,10 +12,15 @@ require 'nanoc/spec'
|
|
12
12
|
|
13
13
|
require 'timecop'
|
14
14
|
require 'rspec/its'
|
15
|
+
require 'fuubar'
|
15
16
|
|
16
17
|
Nanoc::CLI.setup
|
17
18
|
|
18
19
|
RSpec.configure do |c|
|
20
|
+
c.fuubar_progress_bar_options = {
|
21
|
+
format: '%c/%C |<%b>%i| %p%%',
|
22
|
+
}
|
23
|
+
|
19
24
|
c.around(:each) do |example|
|
20
25
|
Nanoc::CLI::ErrorHandler.disable
|
21
26
|
example.run
|
@@ -40,12 +45,6 @@ RSpec.configure do |c|
|
|
40
45
|
Nanoc::Int::NotificationCenter.reset
|
41
46
|
end
|
42
47
|
|
43
|
-
c.before(:each, v8: true) do
|
44
|
-
if ENV.key?('DISABLE_V8')
|
45
|
-
skip 'V8 specs are disabled (broken on Ruby 2.4)'
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
48
|
c.around(:each, stdio: true) do |example|
|
50
49
|
orig_stdout = $stdout
|
51
50
|
orig_stderr = $stderr
|
@@ -26,41 +26,6 @@ class Nanoc::Int::IdentifiableCollectionTest < Nanoc::TestCase
|
|
26
26
|
assert_equal @one, @items.find { |i| i.identifier == '/one/' }
|
27
27
|
end
|
28
28
|
|
29
|
-
def test_brackets_with_glob
|
30
|
-
@items = Nanoc::Int::IdentifiableCollection.new({ string_pattern_type: 'glob' }, [@one, @two])
|
31
|
-
|
32
|
-
assert_equal @one, @items['/on*/']
|
33
|
-
assert_equal @two, @items['/*wo/']
|
34
|
-
end
|
35
|
-
|
36
|
-
def test_brackets_with_identifier
|
37
|
-
assert_equal @one, @items['/one/']
|
38
|
-
assert_equal @two, @items['/two/']
|
39
|
-
assert_nil @items['/max-payne/']
|
40
|
-
end
|
41
|
-
|
42
|
-
def test_brackets_with_malformed_identifier
|
43
|
-
assert_nil @items['one/']
|
44
|
-
assert_nil @items['/one']
|
45
|
-
assert_nil @items['one']
|
46
|
-
assert_nil @items['//one/']
|
47
|
-
end
|
48
|
-
|
49
|
-
def test_brackets_frozen
|
50
|
-
@items.freeze
|
51
|
-
|
52
|
-
assert_equal @one, @items['/one/']
|
53
|
-
assert_nil @items['/tenthousand/']
|
54
|
-
end
|
55
|
-
|
56
|
-
def test_regex
|
57
|
-
foo = Nanoc::Int::Item.new('Item Foo', {}, '/foo/')
|
58
|
-
@items = Nanoc::Int::IdentifiableCollection.new({}, [@one, @two, foo])
|
59
|
-
|
60
|
-
assert_equal @one, @items[/n/]
|
61
|
-
assert_equal @two, @items[%r{o/}] # not foo
|
62
|
-
end
|
63
|
-
|
64
29
|
def test_less_than_less_than
|
65
30
|
assert_nil @items['/foo/']
|
66
31
|
|
@@ -51,20 +51,6 @@ class Nanoc::Checking::Checks::ExternalLinksTest < Nanoc::TestCase
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
-
def test_fallback_to_get_when_head_is_not_allowed
|
55
|
-
with_site do |site|
|
56
|
-
# Create check
|
57
|
-
check = Nanoc::Checking::Checks::ExternalLinks.create(site)
|
58
|
-
def check.request_url_once(url, req_method = Net::HTTP::Head)
|
59
|
-
Net::HTTPResponse.new('1.1', req_method == Net::HTTP::Head || url.path == '/405' ? '405' : '200', 'okay')
|
60
|
-
end
|
61
|
-
|
62
|
-
# Test
|
63
|
-
assert_nil check.validate('http://127.0.0.1:9204')
|
64
|
-
refute_nil check.validate('http://127.0.0.1:9204/405')
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
54
|
def test_path_for_url
|
69
55
|
with_site do |site|
|
70
56
|
check = Nanoc::Checking::Checks::ExternalLinks.create(site)
|
@@ -4,8 +4,6 @@ require 'helper'
|
|
4
4
|
|
5
5
|
class Nanoc::Filters::HandlebarsTest < Nanoc::TestCase
|
6
6
|
def test_filter
|
7
|
-
skip_v8_on_ruby24
|
8
|
-
|
9
7
|
if_have 'handlebars' do
|
10
8
|
# Create data
|
11
9
|
item = Nanoc::Int::Item.new(
|
@@ -40,8 +38,6 @@ class Nanoc::Filters::HandlebarsTest < Nanoc::TestCase
|
|
40
38
|
end
|
41
39
|
|
42
40
|
def test_filter_without_layout
|
43
|
-
skip_v8_on_ruby24
|
44
|
-
|
45
41
|
if_have 'handlebars' do
|
46
42
|
# Create data
|
47
43
|
item = Nanoc::Int::Item.new(
|
@@ -4,8 +4,6 @@ require 'helper'
|
|
4
4
|
|
5
5
|
class Nanoc::Filters::UglifyJSTest < Nanoc::TestCase
|
6
6
|
def test_filter
|
7
|
-
skip_v8_on_ruby24
|
8
|
-
|
9
7
|
if_have 'uglifier' do
|
10
8
|
# Create filter
|
11
9
|
filter = ::Nanoc::Filters::UglifyJS.new
|
@@ -18,8 +16,6 @@ class Nanoc::Filters::UglifyJSTest < Nanoc::TestCase
|
|
18
16
|
end
|
19
17
|
|
20
18
|
def test_filter_with_options
|
21
|
-
skip_v8_on_ruby24
|
22
|
-
|
23
19
|
if_have 'uglifier' do
|
24
20
|
filter = ::Nanoc::Filters::UglifyJS.new
|
25
21
|
input = "if(donkey) alert('It is a donkey!');"
|
data/test/helper.rb
CHANGED
@@ -33,12 +33,6 @@ module Nanoc::TestHelpers
|
|
33
33
|
ENV.key?('DISABLE_NOKOGIRI')
|
34
34
|
end
|
35
35
|
|
36
|
-
def skip_v8_on_ruby24
|
37
|
-
if ENV.key?('DISABLE_V8')
|
38
|
-
skip 'V8 specs are disabled (broken on Ruby 2.4)'
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
36
|
def if_have(*libs)
|
43
37
|
libs.each do |lib|
|
44
38
|
if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby' && lib == 'nokogiri' && disable_nokogiri?
|
@@ -28,6 +28,24 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
28
28
|
item
|
29
29
|
end
|
30
30
|
|
31
|
+
def setup
|
32
|
+
super
|
33
|
+
|
34
|
+
config = Nanoc::Int::Configuration.new.with_defaults
|
35
|
+
items = Nanoc::Int::IdentifiableCollection.new(config)
|
36
|
+
layouts = Nanoc::Int::IdentifiableCollection.new(config)
|
37
|
+
dep_store = Nanoc::Int::DependencyStore.new(items, layouts)
|
38
|
+
dependency_tracker = Nanoc::Int::DependencyTracker.new(dep_store)
|
39
|
+
|
40
|
+
@view_context = Nanoc::ViewContext.new(
|
41
|
+
reps: :__irrelevant__,
|
42
|
+
items: nil,
|
43
|
+
dependency_tracker: dependency_tracker,
|
44
|
+
compilation_context: :__irrelevant__,
|
45
|
+
snapshot_repo: :__irrelevant_snapshot_repo,
|
46
|
+
)
|
47
|
+
end
|
48
|
+
|
31
49
|
def test_atom_feed
|
32
50
|
if_have 'builder' do
|
33
51
|
# Create items
|
@@ -51,7 +69,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
51
69
|
@items[2].expects(:compiled_content).with(snapshot: :pre).returns('item 2 content')
|
52
70
|
|
53
71
|
# Mock site
|
54
|
-
|
72
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
73
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
55
74
|
|
56
75
|
# Create feed item
|
57
76
|
@item = mock
|
@@ -82,7 +101,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
82
101
|
@items[2].expects(:compiled_content).returns('item 2 content')
|
83
102
|
|
84
103
|
# Mock site
|
85
|
-
|
104
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
105
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
86
106
|
|
87
107
|
# Create feed item
|
88
108
|
@item = mock
|
@@ -113,7 +133,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
113
133
|
@items[2].expects(:compiled_content).returns('item 2 content')
|
114
134
|
|
115
135
|
# Mock site
|
116
|
-
|
136
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
137
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
117
138
|
|
118
139
|
# Create feed item
|
119
140
|
@item = mock
|
@@ -144,7 +165,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
144
165
|
@items[2].expects(:compiled_content).returns('item 2 content')
|
145
166
|
|
146
167
|
# Mock site
|
147
|
-
|
168
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
169
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
148
170
|
|
149
171
|
# Create feed item
|
150
172
|
@item = mock
|
@@ -165,7 +187,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
165
187
|
@items = [mock_item, mock_item]
|
166
188
|
|
167
189
|
# Mock site
|
168
|
-
|
190
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
191
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
169
192
|
|
170
193
|
# Create feed item
|
171
194
|
@item = mock
|
@@ -190,7 +213,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
190
213
|
@items = [mock_item, mock_article]
|
191
214
|
|
192
215
|
# Mock site
|
193
|
-
|
216
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: nil })
|
217
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
194
218
|
|
195
219
|
# Create feed item
|
196
220
|
@item = mock
|
@@ -215,7 +239,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
215
239
|
@items = [mock_item, mock_article]
|
216
240
|
|
217
241
|
# Mock site
|
218
|
-
|
242
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
243
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
219
244
|
|
220
245
|
# Create feed item
|
221
246
|
@item = mock
|
@@ -240,7 +265,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
240
265
|
@items = [mock_item, mock_article]
|
241
266
|
|
242
267
|
# Mock site
|
243
|
-
|
268
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
269
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
244
270
|
|
245
271
|
# Create feed item
|
246
272
|
@item = mock
|
@@ -270,7 +296,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
270
296
|
@items[0].expects(:compiled_content).returns('item 1 content')
|
271
297
|
|
272
298
|
# Mock site
|
273
|
-
|
299
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com/' })
|
300
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
274
301
|
|
275
302
|
# Create feed item
|
276
303
|
@item = mock
|
@@ -312,7 +339,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
312
339
|
@items = [mock_item, mock_article]
|
313
340
|
|
314
341
|
# Mock site
|
315
|
-
|
342
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
343
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
316
344
|
|
317
345
|
# Create feed item
|
318
346
|
@item = mock
|
@@ -339,7 +367,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
339
367
|
@items[2].stubs(:[]).with(:created_at).returns(nil)
|
340
368
|
|
341
369
|
# Mock site
|
342
|
-
|
370
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
371
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
343
372
|
|
344
373
|
# Create feed item
|
345
374
|
@item = mock
|
@@ -365,7 +394,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
365
394
|
@items[1].expects(:compiled_content).with(snapshot: :pre).returns('asdf')
|
366
395
|
|
367
396
|
# Mock site
|
368
|
-
|
397
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
398
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
369
399
|
|
370
400
|
# Create feed item
|
371
401
|
@item = mock
|
@@ -390,15 +420,15 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
390
420
|
@items[1].expects(:compiled_content).with(snapshot: :pre).returns('asdf')
|
391
421
|
|
392
422
|
# Mock site
|
393
|
-
|
423
|
+
config_hash =
|
394
424
|
{
|
395
425
|
author_name: 'Bob',
|
396
426
|
author_uri: 'http://example.com/~bob/',
|
397
427
|
title: 'My Blog Or Something',
|
398
428
|
base_url: 'http://example.com',
|
399
|
-
}
|
400
|
-
|
401
|
-
)
|
429
|
+
}
|
430
|
+
config = Nanoc::Int::Configuration.new(hash: config_hash)
|
431
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
402
432
|
|
403
433
|
# Create feed item
|
404
434
|
@item = mock
|
@@ -422,7 +452,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
422
452
|
@items[1].expects(:compiled_content).with(snapshot: :pre).returns('asdf')
|
423
453
|
|
424
454
|
# Mock site
|
425
|
-
|
455
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
456
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
426
457
|
|
427
458
|
# Create feed item
|
428
459
|
@item = mock
|
@@ -446,7 +477,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
446
477
|
end
|
447
478
|
|
448
479
|
# Mock site
|
449
|
-
|
480
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
481
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
450
482
|
|
451
483
|
# Create feed item
|
452
484
|
@item = mock
|
@@ -479,7 +511,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
479
511
|
@items[1].stubs(:[]).with(:created_at).returns('22-03-2009')
|
480
512
|
|
481
513
|
# Mock site
|
482
|
-
|
514
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
515
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
483
516
|
|
484
517
|
# Create feed item
|
485
518
|
@item = mock
|
@@ -508,7 +541,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
508
541
|
@items[1].stubs(:[]).with(:created_at).returns('01-01-2014')
|
509
542
|
|
510
543
|
# Mock site
|
511
|
-
|
544
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
545
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
512
546
|
|
513
547
|
# Create feed item
|
514
548
|
@item = mock
|
@@ -532,7 +566,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
532
566
|
@items = [mock_article]
|
533
567
|
|
534
568
|
# Mock site
|
535
|
-
|
569
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
570
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
536
571
|
|
537
572
|
# Create feed item
|
538
573
|
@item = mock
|
@@ -553,7 +588,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
553
588
|
@items = [mock_article]
|
554
589
|
|
555
590
|
# Mock site
|
556
|
-
|
591
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
592
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
557
593
|
|
558
594
|
# Create feed item
|
559
595
|
@item = mock
|
@@ -574,7 +610,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
574
610
|
@items = [mock_article]
|
575
611
|
|
576
612
|
# Mock site
|
577
|
-
|
613
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
614
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
578
615
|
|
579
616
|
# Create feed item
|
580
617
|
@item = mock
|
@@ -595,7 +632,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
595
632
|
@items = [mock_article]
|
596
633
|
|
597
634
|
# Mock site
|
598
|
-
|
635
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
636
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
599
637
|
|
600
638
|
# Create feed item
|
601
639
|
@item = mock
|
@@ -616,7 +654,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
616
654
|
@items = [mock_article]
|
617
655
|
|
618
656
|
# Mock site
|
619
|
-
|
657
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
658
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
620
659
|
|
621
660
|
# Create feed item
|
622
661
|
@item = mock
|
@@ -638,7 +677,8 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
|
|
638
677
|
@items[0].stubs(:path).returns(nil)
|
639
678
|
|
640
679
|
# Mock site
|
641
|
-
|
680
|
+
config = Nanoc::Int::Configuration.new(hash: { base_url: 'http://example.com' })
|
681
|
+
@config = Nanoc::ConfigView.new(config, @view_context)
|
642
682
|
|
643
683
|
# Create feed item
|
644
684
|
@item = mock
|