red_cloth_formatters_plain 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: db86ce3f3e8b3f3275dba620bb84b7657468ed78
4
+ data.tar.gz: 0d9b80fa80f6f99e1f29f1afb480a0aee760c728
5
+ SHA512:
6
+ metadata.gz: ec35794823a676a2fbb4d22ead080f5dc2222d658b86cabcdde75bcf7cc5ccf52b9d98bb5c691b2c8e0a4e33aa93f86fa3ad3315be55c93a6cdb641cffe48992
7
+ data.tar.gz: 438af3473dd5d82bebf352b44e5a78a4fa3808200a7acff85db680159a65ccdf10bd692f33935af0fe814fb5acce4abbb4060a84151096f44c8de33c4bd1ce96
@@ -26,7 +26,7 @@ module RedCloth
26
26
 
27
27
  [:h1, :h2, :h3, :h4, :h5, :h6, :p, :pre, :div].each do |m|
28
28
  define_method(m) do |opts|
29
- "#{opts[:text]}\n\n"
29
+ "#{opts[:text]}\n"
30
30
  end
31
31
  end
32
32
 
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "red_cloth_formatters_plain"
6
- s.version = "0.2.1"
6
+ s.version = "0.3.0"
7
7
  s.authors = ["Joseph Halter", "Jeff Zellman"]
8
8
  s.email = ["joseph@openhood.com", "jzellman@gmail.com"]
9
9
  s.homepage = "https://github.com/JosephHalter/redcloth-formatters-plain"
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
16
16
  s.require_paths = ["lib"]
17
17
 
18
- s.add_development_dependency "rspec", "~> 2"
18
+ s.add_development_dependency "rspec"
19
19
  s.add_development_dependency "rake"
20
20
  s.add_dependency "RedCloth", ">= 4.2.3"
21
21
  end
@@ -4,7 +4,7 @@ require "spec_helper"
4
4
  describe "RedCloth::Formatters::Plain" do
5
5
 
6
6
  it "simple test" do
7
- RedCloth.new("p. this is *simple* _test_").to_plain.should == "this is simple test"
7
+ expect(RedCloth.new("p. this is *simple* _test_").to_plain).to eq("this is simple test")
8
8
  end
9
9
 
10
10
  describe "Writing Paragraph Text" do
@@ -12,94 +12,94 @@ describe "RedCloth::Formatters::Plain" do
12
12
  it "implicit" do
13
13
  input = "This is a paragraph.\n\nThis is another paragraph"
14
14
  output = "This is a paragraph.\nThis is another paragraph"
15
- RedCloth.new(input).to_plain.should == output
15
+ expect(RedCloth.new(input).to_plain).to eq(output)
16
16
  end
17
17
  it "explicit" do
18
18
  input = "p. This is one paragraph.\n\np. This is another."
19
19
  output = "This is one paragraph.\nThis is another."
20
- RedCloth.new(input).to_plain.should == output
20
+ expect(RedCloth.new(input).to_plain).to eq(output)
21
21
  end
22
22
  end
23
23
  describe "Line breaks" do
24
24
  it "implicit" do
25
25
  input = "Roses are red,\nViolets are blue,\nI'd like a sandwich;\nPerhaps even two."
26
- RedCloth.new(input).to_plain.should == input
26
+ expect(RedCloth.new(input).to_plain).to eq(input)
27
27
  end
28
28
  it "in tags" do
29
29
  input = "<pre>\nMirror mirror\non the wall...\n</pre>"
30
30
  output = "\nMirror mirror\non the wall...\n"
31
- RedCloth.new(input).to_plain.should == output
31
+ expect(RedCloth.new(input).to_plain).to eq(output)
32
32
  end
33
33
  end
34
34
  describe "Curly quotes" do
35
35
  it "quotations" do
36
36
  input = "\"I said, 'hold the mayo' twice!\""
37
- RedCloth.new(input).to_plain.should == input
37
+ expect(RedCloth.new(input).to_plain).to eq(input)
38
38
  end
39
39
  it "apostrophes" do
40
40
  input = "We went to Steven's mother's house for a party."
41
- RedCloth.new(input).to_plain.should == input
41
+ expect(RedCloth.new(input).to_plain).to eq(input)
42
42
  end
43
43
  end
44
44
  describe "Dashes" do
45
45
  it "single and double hyphens" do
46
46
  input = "I could be happy--fantastically happy--on twenty-one thousand a year if I only had to work 9 am - 1 pm."
47
47
  output = "I could be happy-fantastically happy-on twenty-one thousand a year if I only had to work 9 am - 1 pm."
48
- RedCloth.new(input).to_plain.should == output
48
+ expect(RedCloth.new(input).to_plain).to eq(output)
49
49
  end
50
50
  it "between words" do
51
51
  input = "June - July 1967"
52
- RedCloth.new(input).to_plain.should == input
52
+ expect(RedCloth.new(input).to_plain).to eq(input)
53
53
  end
54
54
  it "em dashes" do
55
55
  input = "Please use the em dash closed--or open if you must -- but I prefer it closed."
56
56
  output = "Please use the em dash closed-or open if you must - but I prefer it closed."
57
- RedCloth.new(input).to_plain.should == output
57
+ expect(RedCloth.new(input).to_plain).to eq(output)
58
58
  end
59
59
  end
60
60
  describe "Ellipses" do
61
61
  it "tree periods" do
62
62
  input = "He thought and thought ... and then thought some more."
63
- RedCloth.new(input).to_plain.should == input
63
+ expect(RedCloth.new(input).to_plain).to eq(input)
64
64
  end
65
65
  it "in conjunction with spaces and other punctuation" do
66
66
  input = "Four score and seven years ago our fathers brought forth...a new nation...dedicated to the proposition that all men are created equal...."
67
- RedCloth.new(input).to_plain.should == input
67
+ expect(RedCloth.new(input).to_plain).to eq(input)
68
68
  end
69
69
  end
70
70
  describe "Dimension sign" do
71
71
  it "lowercase letter x" do
72
72
  input = "4 x 4 = 16"
73
- RedCloth.new(input).to_plain.should == input
73
+ expect(RedCloth.new(input).to_plain).to eq(input)
74
74
  end
75
75
  it "to represent feet and inches" do
76
76
  input = "My office measures 5' x 5'6\"."
77
- RedCloth.new(input).to_plain.should == input
77
+ expect(RedCloth.new(input).to_plain).to eq(input)
78
78
  end
79
79
  it "spaces are optional" do
80
80
  input = "4x4=16"
81
- RedCloth.new(input).to_plain.should == input
81
+ expect(RedCloth.new(input).to_plain).to eq(input)
82
82
  end
83
83
  end
84
84
  it "Registered, trademark, and copyright symbols" do
85
85
  input = "RegisteredTrademark(r), Trademark(tm), and Copyright (c) 2008"
86
86
  output = "RegisteredTrademark®, Trademark™, and Copyright © 2008"
87
- RedCloth.new(input).to_plain.should == output
87
+ expect(RedCloth.new(input).to_plain).to eq(output)
88
88
  end
89
89
  it "Acronyms" do
90
90
  input = "The EPA(Environmental Protection Agency) is measuring GHG(greenhouse gas) emissions."
91
- RedCloth.new(input).to_plain.should == input
91
+ expect(RedCloth.new(input).to_plain).to eq(input)
92
92
  end
93
93
  it "Uppercase" do
94
94
  input = "Many NASDAQ companies are ISO certified."
95
- RedCloth.new(input).to_plain.should == input
95
+ expect(RedCloth.new(input).to_plain).to eq(input)
96
96
  end
97
97
  end
98
98
  describe "Page Layout" do
99
99
  it "Headings" do
100
100
  input = "h1. This is a Heading 1\n\nThis might be an introductory paragraph on the general topic.\n\nh2. Heading 2 gets more specific\n\nNow we're getting into the details."
101
101
  output = "This is a Heading 1\nThis might be an introductory paragraph on the general topic.\nHeading 2 gets more specific\nNow we're getting into the details."
102
- RedCloth.new(input).to_plain.should == output
102
+ expect(RedCloth.new(input).to_plain).to eq(output)
103
103
  end
104
104
  describe "Block quotations" do
105
105
  it "long quotations" do
@@ -109,14 +109,14 @@ describe "RedCloth::Formatters::Plain" do
109
109
  output = "Even Mr. Sedaris, a noted luddite, has finally succumbed to doing his writing on a computer. The Internet, however, remains an idiotic trifle:\n"
110
110
  output += "I've never seen the Internet. I don't have email. I just enjoy lying on the couch and reading a magazine. When people say, \"You should visit my Web page,\" I'm always perplexed by it. Why? What do you do there?\n"
111
111
  output += "Haven't we all pondered that at one time or another?"
112
- RedCloth.new(input).to_plain.should == output
112
+ expect(RedCloth.new(input).to_plain).to eq(output)
113
113
  end
114
114
  it "citation URL immediately following the period" do
115
115
  input = "A standard Lorem Ipsum passage has been used since the 1500s:\n\n"
116
116
  input += "bq.:http://www.lipsum.com/ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
117
117
  output = "A standard Lorem Ipsum passage has been used since the 1500s:\n"
118
118
  output += "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
119
- RedCloth.new(input).to_plain.should == output
119
+ expect(RedCloth.new(input).to_plain).to eq(output)
120
120
  end
121
121
  it "more than one paragraph" do
122
122
  input = "bq.. This is one paragraph.\n\n"
@@ -125,7 +125,7 @@ describe "RedCloth::Formatters::Plain" do
125
125
  output = "This is one paragraph.\n"
126
126
  output += "Another paragraph, also part of the quote.\n"
127
127
  output += "A normal paragraph ends the quote."
128
- RedCloth.new(input).to_plain.should == output
128
+ expect(RedCloth.new(input).to_plain).to eq(output)
129
129
  end
130
130
  end
131
131
  it "Bullet lists" do
@@ -145,7 +145,7 @@ describe "RedCloth::Formatters::Plain" do
145
145
  output += " - You don't wear out the keys on your keyboard as fast\n"
146
146
  output += " - You won't wear out your fingers as fast\n"
147
147
  output += "- You can write it much quicker"
148
- RedCloth.new(input).to_plain.should == output
148
+ expect(RedCloth.new(input).to_plain).to eq(output)
149
149
  end
150
150
  it "Numbered lists" do
151
151
  input = "How to make a PB&J:\n\n"
@@ -164,7 +164,7 @@ describe "RedCloth::Formatters::Plain" do
164
164
  output += " - Put jelly on another slice\n"
165
165
  output += " - Put the two slices together\n"
166
166
  output += "- Enjoy"
167
- RedCloth.new(input).to_plain.should == output
167
+ expect(RedCloth.new(input).to_plain).to eq(output)
168
168
  end
169
169
  it "Mixed nested lists" do
170
170
  input = "Three reasons to walk to work:\n\n"
@@ -179,7 +179,7 @@ describe "RedCloth::Formatters::Plain" do
179
179
  output += " - Walking burns calories\n"
180
180
  output += " - Time outside means lower stress\n"
181
181
  output += "- It's good for the environment"
182
- RedCloth.new(input).to_plain.should == output
182
+ expect(RedCloth.new(input).to_plain).to eq(output)
183
183
  end
184
184
  it "Definition lists" do
185
185
  input = "- coffee := Hot and black\n"
@@ -191,20 +191,20 @@ describe "RedCloth::Formatters::Plain" do
191
191
  output += "tea:\n Also hot, but a little less black\n"
192
192
  output += "milk:\n Nourishing beverage for baby cows.\n"
193
193
  output += "Cold drink that goes great with cookies."
194
- RedCloth.new(input).to_plain.should == output
194
+ expect(RedCloth.new(input).to_plain).to eq(output)
195
195
  end
196
196
  it "Footnotes" do
197
197
  input = "42.7% of all statistics are made up on the spot.[1]\n\n"
198
198
  input += "fn1. \"Dr. Katz\":http://en.wikiquote.org/wiki/Steven_Wright"
199
199
  output = "42.7% of all statistics are made up on the spot."
200
- RedCloth.new(input).to_plain.should == output
200
+ expect(RedCloth.new(input).to_plain).to eq(output)
201
201
  end
202
202
  describe "Tables" do
203
203
  it "simple" do
204
204
  input = "|_. name|_. age|\n"
205
205
  input += "|Walter|5|\n"
206
206
  input += "|Florence|6|"
207
- RedCloth.new(input).to_plain.should == ""
207
+ expect(RedCloth.new(input).to_plain).to eq("")
208
208
  end
209
209
  it "cellspan" do
210
210
  input = "|{background:#ddd}. Cell with background|Normal|\n"
@@ -212,31 +212,31 @@ describe "RedCloth::Formatters::Plain" do
212
212
  input += "|/2. Cell spanning 2 rows|one|\n"
213
213
  input += "|two|\n"
214
214
  input += "|>. Right-aligned cell|<. Left-aligned cell|"
215
- RedCloth.new(input).to_plain.should == ""
215
+ expect(RedCloth.new(input).to_plain).to eq("")
216
216
  end
217
217
  it "with attributes" do
218
218
  input = "table(#prices).\n"
219
219
  input += "|Adults|$5|\n"
220
220
  input += "|Children|$2|"
221
- RedCloth.new(input).to_plain.should == ""
221
+ expect(RedCloth.new(input).to_plain).to eq("")
222
222
  end
223
223
  end
224
224
  it "Divisions" do
225
225
  input = "div. A simple div."
226
226
  output = "A simple div."
227
- RedCloth.new(input).to_plain.should == output
227
+ expect(RedCloth.new(input).to_plain).to eq(output)
228
228
  end
229
229
  end
230
230
  describe "Phrase modifiers" do
231
231
  it "Strong importance" do
232
232
  input = "Don't *ever* pull this lever."
233
233
  output = "Don't ever pull this lever."
234
- RedCloth.new(input).to_plain.should == output
234
+ expect(RedCloth.new(input).to_plain).to eq(output)
235
235
  end
236
236
  it "Stress emphasis" do
237
237
  input = "You didn't actually _believe_ her, did you?"
238
238
  output = "You didn't actually believe her, did you?"
239
- RedCloth.new(input).to_plain.should == output
239
+ expect(RedCloth.new(input).to_plain).to eq(output)
240
240
  end
241
241
  it "Stylistic offset" do
242
242
  input = "Search results for **Textile**:\n\n"
@@ -245,75 +245,75 @@ describe "RedCloth::Formatters::Plain" do
245
245
  output = "Search results for Textile:\n"
246
246
  output += "Textile (markup language) - Wikipedia <http://en.wikipedia.org/wiki/Textile_(markup_language)>\n"
247
247
  output += "Textile is a lightweight markup language originally developed by Dean Allen and billed as a \"humane Web text generator\". Textile converts its marked-up text ..."
248
- RedCloth.new(input).to_plain.should == output
248
+ expect(RedCloth.new(input).to_plain).to eq(output)
249
249
  end
250
250
  it "Alternate voice" do
251
251
  input = "I just got the weirdest feeling of __déjà vu__."
252
252
  output = "I just got the weirdest feeling of déjà vu."
253
- RedCloth.new(input).to_plain.should == output
253
+ expect(RedCloth.new(input).to_plain).to eq(output)
254
254
  end
255
255
  it "Citation" do
256
256
  input = "My wife's favorite book is ??The Count of Monte Cristo?? by Dumas."
257
257
  output = "My wife's favorite book is The Count of Monte Cristo by Dumas."
258
- RedCloth.new(input).to_plain.should == output
258
+ expect(RedCloth.new(input).to_plain).to eq(output)
259
259
  end
260
260
  describe "Insertions and deletions" do
261
261
  it "using minuses and pluses" do
262
262
  input = "The news networks declared -Al Gore- +George W. Bush+ the winner in Florida."
263
263
  output = "The news networks declared George W. Bush the winner in Florida."
264
- RedCloth.new(input).to_plain.should == output
264
+ expect(RedCloth.new(input).to_plain).to eq(output)
265
265
  end
266
266
  it "surrounded with square brackets" do
267
267
  input = "[-this was deleted-][+this was added+] to the paragraph"
268
268
  output = "this was added to the paragraph"
269
- RedCloth.new(input).to_plain.should == output
269
+ expect(RedCloth.new(input).to_plain).to eq(output)
270
270
  end
271
271
  end
272
272
  describe "Superscript and subscript" do
273
273
  it "surrounded with caret and tilde characters" do
274
274
  input = "f(x, n) = log ~4~ x ^n^"
275
275
  output = "f(x, n) = log 4 x n"
276
- RedCloth.new(input).to_plain.should == output
276
+ expect(RedCloth.new(input).to_plain).to eq(output)
277
277
  end
278
278
  it "using square brackets" do
279
279
  input = "f(x, n) = log[~4~]x[^n^]"
280
280
  output = "f(x, n) = log4xn"
281
- RedCloth.new(input).to_plain.should == output
281
+ expect(RedCloth.new(input).to_plain).to eq(output)
282
282
  end
283
283
  end
284
284
  describe "Links" do
285
285
  it "followed by a colon" do
286
286
  input = "Learn more \"about the company\":/about and our \"board of directors\":../about#board."
287
287
  output = "Learn more about the company </about> and our board of directors <../about#board>."
288
- RedCloth.new(input).to_plain.should == output
288
+ expect(RedCloth.new(input).to_plain).to eq(output)
289
289
  end
290
290
  it "with title" do
291
291
  input = "Visit our \"parent company (Example Corporation)\":http://example.com."
292
292
  output = "Visit our parent company <http://example.com>."
293
- RedCloth.new(input).to_plain.should == output
293
+ expect(RedCloth.new(input).to_plain).to eq(output)
294
294
  end
295
295
  it "surrounded with square brackets" do
296
296
  input = "This is a link to a [\"Wikipedia article about Textile\":http://en.wikipedia.org/wiki/Textile_(markup_language)]."
297
297
  output = "This is a link to a Wikipedia article about Textile <http://en.wikipedia.org/wiki/Textile_(markup_language)>."
298
- RedCloth.new(input).to_plain.should == output
298
+ expect(RedCloth.new(input).to_plain).to eq(output)
299
299
  end
300
300
  it "with alias" do
301
301
  input = "I'm really excited about \"RedCloth\":redcloth. I love it so much, I think I'll name my first child \"RedCloth\":redcloth.\n\n"
302
302
  input += "[redcloth]http://redcloth.org"
303
303
  output = "I'm really excited about RedCloth <http://redcloth.org>. I love it so much, I think I'll name my first child RedCloth <http://redcloth.org>."
304
- RedCloth.new(input).to_plain.should == output
304
+ expect(RedCloth.new(input).to_plain).to eq(output)
305
305
  end
306
306
  end
307
307
  describe "Images" do
308
308
  it "with exclamation marks" do
309
309
  input = "!http://www.w3.org/Icons/valid-html401(This page is valid HTML)!"
310
310
  output = "This page is valid HTML"
311
- RedCloth.new(input).to_plain.should == output
311
+ expect(RedCloth.new(input).to_plain).to eq(output)
312
312
  end
313
313
  it "linked" do
314
314
  input = "!http://www.w3.org/Icons/valid-html401!:http://validator.w3.org/check?uri=referer"
315
315
  output = ""
316
- RedCloth.new(input).to_plain.should == output
316
+ expect(RedCloth.new(input).to_plain).to eq(output)
317
317
  end
318
318
  end
319
319
  end
@@ -322,28 +322,28 @@ describe "RedCloth::Formatters::Plain" do
322
322
  it "class or id" do
323
323
  input = "p(my-class). This is a paragraph that has a class and this *(#special-phrase)emphasized phrase* has an id."
324
324
  output = "This is a paragraph that has a class and this emphasized phrase has an id."
325
- RedCloth.new(input).to_plain.should == output
325
+ expect(RedCloth.new(input).to_plain).to eq(output)
326
326
  end
327
327
  it "id on paragraph" do
328
328
  input = "p(#my-paragraph). This is a paragraph that has an id."
329
329
  output = "This is a paragraph that has an id."
330
- RedCloth.new(input).to_plain.should == output
330
+ expect(RedCloth.new(input).to_plain).to eq(output)
331
331
  end
332
332
  it "both class and id" do
333
333
  input = "div(myclass#myid). This div has both a CSS class and ID."
334
334
  output = "This div has both a CSS class and ID."
335
- RedCloth.new(input).to_plain.should == output
335
+ expect(RedCloth.new(input).to_plain).to eq(output)
336
336
  end
337
337
  end
338
338
  it "CSS styles" do
339
339
  input = "p{color:blue;letter-spacing:.5em}. Spacey blue"
340
340
  output = "Spacey blue"
341
- RedCloth.new(input).to_plain.should == output
341
+ expect(RedCloth.new(input).to_plain).to eq(output)
342
342
  end
343
343
  it "Language" do
344
344
  input = "p[fr]. Parlez-vous français ?"
345
345
  output = "Parlez-vous français ?"
346
- RedCloth.new(input).to_plain.should == output
346
+ expect(RedCloth.new(input).to_plain).to eq(output)
347
347
  end
348
348
  it "Alignment" do
349
349
  input = "p<. align left\n\n"
@@ -354,7 +354,7 @@ describe "RedCloth::Formatters::Plain" do
354
354
  output += "align right\n"
355
355
  output += "centered\n"
356
356
  output += "justified justified justified justified justified justified justified justified justified"
357
- RedCloth.new(input).to_plain.should == output
357
+ expect(RedCloth.new(input).to_plain).to eq(output)
358
358
  end
359
359
  it "Indentation" do
360
360
  input = "p(. Left pad 1em.\n\n"
@@ -363,19 +363,19 @@ describe "RedCloth::Formatters::Plain" do
363
363
  output = "Left pad 1em.\n"
364
364
  output += "Right pad 2em.\n"
365
365
  output += "Pad both left and right sides 1em."
366
- RedCloth.new(input).to_plain.should == output
366
+ expect(RedCloth.new(input).to_plain).to eq(output)
367
367
  end
368
368
  end
369
369
  describe "HTML Integration and Escapement" do
370
370
  it "HTML spans" do
371
371
  input = "I can put in a %(myclass)span with a class% like this."
372
372
  output = "I can put in a span with a class like this."
373
- RedCloth.new(input).to_plain.should == output
373
+ expect(RedCloth.new(input).to_plain).to eq(output)
374
374
  end
375
375
  it "Inline code" do
376
376
  input = "On the command line, you can just type @redcloth@."
377
377
  output = "On the command line, you can just type redcloth."
378
- RedCloth.new(input).to_plain.should == output
378
+ expect(RedCloth.new(input).to_plain).to eq(output)
379
379
  end
380
380
  describe "Block code" do
381
381
  it "block of code" do
@@ -385,7 +385,7 @@ describe "RedCloth::Formatters::Plain" do
385
385
  output = "# Output \"I love Ruby\"\n"
386
386
  output += "say = \"I love Ruby\"\n"
387
387
  output += "puts say"
388
- RedCloth.new(input).to_plain.should == output
388
+ expect(RedCloth.new(input).to_plain).to eq(output)
389
389
  end
390
390
  it "including blank lines" do
391
391
  input = "bc.. # Output \"I love Ruby\"\n"
@@ -402,13 +402,13 @@ describe "RedCloth::Formatters::Plain" do
402
402
  output += "say['love'] = \"*love*\"\n"
403
403
  output += "puts say.upcase\n"
404
404
  output += "And that is how you do it."
405
- RedCloth.new(input).to_plain.should == output
405
+ expect(RedCloth.new(input).to_plain).to eq(output)
406
406
  end
407
407
  end
408
408
  it "Inline HTML" do
409
409
  input = "I can use HTML directly in my <span class=\"youbetcha\">Textile</span>."
410
410
  output = "I can use HTML directly in my Textile."
411
- RedCloth.new(input).to_plain.should == output
411
+ expect(RedCloth.new(input).to_plain).to eq(output)
412
412
  end
413
413
  it "Block HTML" do
414
414
  input = "<div id=\"shopping-cart\">\n"
@@ -424,7 +424,7 @@ describe "RedCloth::Formatters::Plain" do
424
424
  output += "- Item one\n"
425
425
  output += "- Item two"
426
426
  output += "\n\n"
427
- RedCloth.new(input).to_plain.should == output
427
+ expect(RedCloth.new(input).to_plain).to eq(output)
428
428
  end
429
429
  describe "No Textile" do
430
430
  it "notextile tag or double-equals" do
@@ -434,7 +434,7 @@ describe "RedCloth::Formatters::Plain" do
434
434
  input += "Use ==*asterisks*== to say something *strongly*."
435
435
  output = "Don't touch this!\n"
436
436
  output += "Use *asterisks* to say something strongly."
437
- RedCloth.new(input).to_plain.should == output
437
+ expect(RedCloth.new(input).to_plain).to eq(output)
438
438
  end
439
439
  it "as normal or extended block" do
440
440
  input = "notextile. This has *no* textile formatting, see?\n\n"
@@ -445,7 +445,7 @@ describe "RedCloth::Formatters::Plain" do
445
445
  output += "And this notextile block\n\n"
446
446
  output += "Just keeps going and going."
447
447
  output += "Until you end it with another block."
448
- RedCloth.new(input).to_plain.should == output
448
+ expect(RedCloth.new(input).to_plain).to eq(output)
449
449
  end
450
450
  end
451
451
  describe "Preformatted text" do
@@ -465,7 +465,7 @@ describe "RedCloth::Formatters::Plain" do
465
465
  output += " __\ " " /__ \n"
466
466
  output += " (____/^\____)"
467
467
  input = "pre. #{output}"
468
- RedCloth.new(input).to_plain.should == output
468
+ expect(RedCloth.new(input).to_plain).to eq(output)
469
469
  end
470
470
  it "extended" do
471
471
  input = "pre.. All monospaced\n\n"
@@ -474,7 +474,7 @@ describe "RedCloth::Formatters::Plain" do
474
474
  output = "All monospaced\n"
475
475
  output += "Even the blank lines\n"
476
476
  output += "But now a paragraph"
477
- RedCloth.new(input).to_plain.should == output
477
+ expect(RedCloth.new(input).to_plain).to eq(output)
478
478
  end
479
479
  end
480
480
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: red_cloth_formatters_plain
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.2.1
4
+ version: 0.3.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Joseph Halter
@@ -10,56 +9,50 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-06-14 00:00:00.000000000 Z
12
+ date: 2015-09-22 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: rspec
17
16
  requirement: !ruby/object:Gem::Requirement
18
17
  requirements:
19
- - - ~>
18
+ - - ">="
20
19
  - !ruby/object:Gem::Version
21
- version: '2'
22
- none: false
20
+ version: '0'
23
21
  type: :development
22
+ prerelease: false
24
23
  version_requirements: !ruby/object:Gem::Requirement
25
24
  requirements:
26
- - - ~>
25
+ - - ">="
27
26
  - !ruby/object:Gem::Version
28
- version: '2'
29
- none: false
30
- prerelease: false
27
+ version: '0'
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: rake
33
30
  requirement: !ruby/object:Gem::Requirement
34
31
  requirements:
35
- - - ! '>='
32
+ - - ">="
36
33
  - !ruby/object:Gem::Version
37
34
  version: '0'
38
- none: false
39
35
  type: :development
36
+ prerelease: false
40
37
  version_requirements: !ruby/object:Gem::Requirement
41
38
  requirements:
42
- - - ! '>='
39
+ - - ">="
43
40
  - !ruby/object:Gem::Version
44
41
  version: '0'
45
- none: false
46
- prerelease: false
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: RedCloth
49
44
  requirement: !ruby/object:Gem::Requirement
50
45
  requirements:
51
- - - ! '>='
46
+ - - ">="
52
47
  - !ruby/object:Gem::Version
53
48
  version: 4.2.3
54
- none: false
55
49
  type: :runtime
50
+ prerelease: false
56
51
  version_requirements: !ruby/object:Gem::Requirement
57
52
  requirements:
58
- - - ! '>='
53
+ - - ">="
59
54
  - !ruby/object:Gem::Version
60
55
  version: 4.2.3
61
- none: false
62
- prerelease: false
63
56
  description: Allows Redcloth to output plain text
64
57
  email:
65
58
  - joseph@openhood.com
@@ -68,7 +61,7 @@ executables: []
68
61
  extensions: []
69
62
  extra_rdoc_files: []
70
63
  files:
71
- - .gitignore
64
+ - ".gitignore"
72
65
  - Gemfile
73
66
  - MIT-LICENSE
74
67
  - README.textile
@@ -79,33 +72,26 @@ files:
79
72
  - spec/spec_helper.rb
80
73
  homepage: https://github.com/JosephHalter/redcloth-formatters-plain
81
74
  licenses: []
75
+ metadata: {}
82
76
  post_install_message:
83
77
  rdoc_options: []
84
78
  require_paths:
85
79
  - lib
86
80
  required_ruby_version: !ruby/object:Gem::Requirement
87
81
  requirements:
88
- - - ! '>='
82
+ - - ">="
89
83
  - !ruby/object:Gem::Version
90
- segments:
91
- - 0
92
- hash: -1068816678848646598
93
84
  version: '0'
94
- none: false
95
85
  required_rubygems_version: !ruby/object:Gem::Requirement
96
86
  requirements:
97
- - - ! '>='
87
+ - - ">="
98
88
  - !ruby/object:Gem::Version
99
- segments:
100
- - 0
101
- hash: -1068816678848646598
102
89
  version: '0'
103
- none: false
104
90
  requirements: []
105
91
  rubyforge_project:
106
- rubygems_version: 1.8.25
92
+ rubygems_version: 2.4.5.1
107
93
  signing_key:
108
- specification_version: 3
94
+ specification_version: 4
109
95
  summary: Redcloth Plain Text Formatter
110
96
  test_files:
111
97
  - spec/red_cloth_formatters_plain_spec.rb