ffakeron 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,10 +9,16 @@ module Faker
9
9
  end
10
10
 
11
11
  def sentence
12
- punctuation = SWANSON_PUNCTUATION.rand
13
12
  quote = SWANSON_QUOTES.rand
13
+ "#{quote}."
14
+ end
15
+
16
+ def sentences(num = 3)
17
+ (1..num+10).map { sentence }.uniq[1..num]
18
+ end
14
19
 
15
- "#{quote}#{punctuation}"
20
+ def paragraphs(num = 3)
21
+ (1..num+10).map { paragraph }.uniq[1..num]
16
22
  end
17
23
 
18
24
  def words(num = 3)
@@ -1,3 +1,3 @@
1
1
  module Fakeron
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -6,15 +6,17 @@ class TestSwansonIpsum < Test::Unit::TestCase
6
6
  end
7
7
 
8
8
  def test_sentence
9
- assert_match /1\+|[ a-z]+/i, Faker::SwansonIpsum.sentence
9
+ assert_match /1\+|[ a-z]+\./i, Faker::SwansonIpsum.sentence
10
10
  end
11
11
 
12
12
  def test_paragraphs
13
13
  assert_match /1\+|[ a-z]+/i, Faker::SwansonIpsum.paragraphs.join(" ")
14
+ assert_equal 3, Faker::SwansonIpsum.paragraphs.uniq.length
14
15
  end
15
16
 
16
17
  def test_sentences
17
18
  assert_match /1\+|[ a-z]+/i, Faker::SwansonIpsum.sentences.join(" ")
19
+ assert_equal 3, Faker::SwansonIpsum.sentences.uniq.length
18
20
  end
19
21
 
20
22
  def test_words
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffakeron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -91,7 +91,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  segments:
93
93
  - 0
94
- hash: -2132846410419671989
94
+ hash: -1140191769023032100
95
95
  required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  segments:
102
102
  - 0
103
- hash: -2132846410419671989
103
+ hash: -1140191769023032100
104
104
  requirements: []
105
105
  rubyforge_project:
106
106
  rubygems_version: 1.8.24