Skip to content

Commit bce59f7

Browse files
authored
Merge pull request #324 from ashmaroli/test-watch-admin
test --watch with this plugin
2 parents 28c4f9c + 1f8c8c2 commit bce59f7

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

spec/jekyll-admin/integration_spec.rb

+14-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
let(:response) { Net::HTTP.get_response(uri) }
1111

1212
before do
13-
Open3.capture2e(*stop_command)
14-
@stdin, @stdout, @stderr, @wait_thr = Open3.popen3(*start_command)
13+
Open3.popen3(*start_command)
1514
sleep 3
1615
end
1716

@@ -47,8 +46,19 @@
4746
end
4847

4948
context "watching" do
50-
it "Jekyll isn't watching" do
51-
expect(@stdout.read).to include("Auto-regeneration: disabled")
49+
it "Jekyll isn't watching", :skip => Gem.win_platform? do
50+
File.open(File.join(source, "page.md"), "a") do |f|
51+
f.puts "peek-a-boo"
52+
end
53+
content = File.read(File.join(source, "page.md"))
54+
output = File.read(File.join(dest, "page.html"))
55+
56+
expect(content).to include("peek-a-boo")
57+
expect(output).not_to include("peek-a-boo")
58+
59+
File.open(File.join(source, "page.md"), "w+") do |f|
60+
f.write "---\nfoo: bar\n---\n\n# Test Page\n"
61+
end
5262
end
5363
end
5464
end

0 commit comments

Comments
 (0)