Remove tests for gists.

This commit is contained in:
Parker Moore 2014-06-01 14:01:57 -04:00
parent 7977769d91
commit ed87454ff8
1 changed files with 0 additions and 109 deletions

View File

@ -259,115 +259,6 @@ CONTENT
end
end
context "gist tag" do
context "simple" do
setup do
@gist = 358471
content = <<CONTENT
---
title: My Cool Gist
---
{% gist #{@gist} %}
CONTENT
create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
end
should "write script tag" do
assert_match "<script src=\"https://gist.github.com/#{@gist}.js\">\s</script>", @result
end
end
context "for private gist" do
context "when valid" do
setup do
@gist = "mattr-/24081a1d93d2898ecf0f"
@filename = "myfile.ext"
content = <<CONTENT
---
title: My Cool Gist
---
{% gist #{@gist} #{@filename} %}
CONTENT
create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
end
should "write script tag with specific file in gist" do
assert_match "<script src=\"https://gist.github.com/#{@gist}.js?file=#{@filename}\">\s</script>", @result
end
end
should "raise ArgumentError when invalid" do
@gist = "mattr-24081a1d93d2898ecf0f"
@filename = "myfile.ext"
content = <<CONTENT
---
title: My Cool Gist
---
{% gist #{@gist} #{@filename} %}
CONTENT
assert_raise ArgumentError do
create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
end
end
end
context "with specific file" do
setup do
@gist = 358471
@filename = 'somefile.rb'
content = <<CONTENT
---
title: My Cool Gist
---
{% gist #{@gist} #{@filename} %}
CONTENT
create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
end
should "write script tag with specific file in gist" do
assert_match "<script src=\"https://gist.github.com/#{@gist}.js?file=#{@filename}\">\s</script>", @result
end
end
context "with blank gist id" do
should "raise ArgumentError" do
content = <<CONTENT
---
title: My Cool Gist
---
{% gist %}
CONTENT
assert_raise ArgumentError do
create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
end
end
end
context "with invalid gist id" do
should "raise ArgumentError" do
invalid_gist = 'invalid'
content = <<CONTENT
---
title: My Cool Gist
---
{% gist #{invalid_gist} %}
CONTENT
assert_raise ArgumentError do
create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
end
end
end
end
context "include tag with parameters" do
context "with symlink'd include" do