test/quesadilla/multi_test.rb in quesadilla-0.1.0 vs test/quesadilla/multi_test.rb in quesadilla-0.1.1
- old
+ new
@@ -3,11 +3,11 @@
module Quesadilla
class MultiTest < TestCase
def test_that_it_extracts_links_and_tags
extraction = extract('Something #tagged with a link http://samsoff.es/posts/hire-sam')
- assert_equal extraction, {
+ expected = {
display_text: 'Something #tagged with a link samsoff.es/posts/hire-sam',
display_html: 'Something <a href="#hashtag-tagged" class="hashtag">#tagged</a> with a link <a href="http://samsoff.es/posts/hire-sam" rel="external nofollow" class="link">samsoff.es/posts/hire-sam</a>',
entities: [
{
type: 'hashtag',
@@ -25,15 +25,16 @@
indices: [30, 62],
display_indices: [30, 55]
}
]
}
+ assert_equal expected, extraction
end
def test_that_it_doesnt_lose_the_last_character
extraction = extract('Something that is **bold**?')
- assert_equal extraction, {
+ expected = {
display_text: 'Something that is bold?',
display_html: 'Something that is <strong>bold</strong>?',
entities: [
{
type: 'double_emphasis',
@@ -42,13 +43,14 @@
indices: [18, 26],
display_indices: [18, 22]
}
]
}
+ assert_equal expected, extraction
extraction = extract('Something that is **bold**')
- assert_equal extraction, {
+ expected = {
display_text: 'Something that is bold',
display_html: 'Something that is <strong>bold</strong>',
entities: [
{
type: 'double_emphasis',
@@ -57,8 +59,9 @@
indices: [18, 26],
display_indices: [18, 22]
}
]
}
+ assert_equal expected, extraction
end
end
end