sixarm_ruby_fab 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +1 -0
  3. data.tar.gz.sig +0 -0
  4. data/.gemtest +0 -0
  5. data/CONTRIBUTING.md +28 -0
  6. data/README.md +91 -0
  7. data/Rakefile +8 -0
  8. data/VERSION +1 -0
  9. data/lib/sixarm_ruby_fab.rb +40 -0
  10. data/lib/sixarm_ruby_fab/agent.rb +20 -0
  11. data/lib/sixarm_ruby_fab/basic.rb +26 -0
  12. data/lib/sixarm_ruby_fab/company.rb +21 -0
  13. data/lib/sixarm_ruby_fab/date.rb +45 -0
  14. data/lib/sixarm_ruby_fab/datetime.rb +44 -0
  15. data/lib/sixarm_ruby_fab/email.rb +12 -0
  16. data/lib/sixarm_ruby_fab/files.rb +113 -0
  17. data/lib/sixarm_ruby_fab/forgery/geo.rb +56 -0
  18. data/lib/sixarm_ruby_fab/forgery/uri.rb +12 -0
  19. data/lib/sixarm_ruby_fab/geo.rb +21 -0
  20. data/lib/sixarm_ruby_fab/id.rb +28 -0
  21. data/lib/sixarm_ruby_fab/internet.rb +12 -0
  22. data/lib/sixarm_ruby_fab/locale.rb +34 -0
  23. data/lib/sixarm_ruby_fab/mime.rb +29 -0
  24. data/lib/sixarm_ruby_fab/names.rb +30 -0
  25. data/lib/sixarm_ruby_fab/password.rb +16 -0
  26. data/lib/sixarm_ruby_fab/phone.rb +12 -0
  27. data/lib/sixarm_ruby_fab/postal.rb +39 -0
  28. data/lib/sixarm_ruby_fab/text.rb +58 -0
  29. data/lib/sixarm_ruby_fab/time.rb +44 -0
  30. data/lib/sixarm_ruby_fab/twitter.rb +119 -0
  31. data/lib/sixarm_ruby_fab/username.rb +16 -0
  32. data/lib/sixarm_ruby_fab/uuid.rb +27 -0
  33. data/test/sixarm_ruby_fab_test.rb +32 -0
  34. data/test/sixarm_ruby_fab_test/agent_test.rb +40 -0
  35. data/test/sixarm_ruby_fab_test/basic_test.rb +35 -0
  36. data/test/sixarm_ruby_fab_test/company_test.rb +34 -0
  37. data/test/sixarm_ruby_fab_test/date_test.rb +67 -0
  38. data/test/sixarm_ruby_fab_test/datetime_test.rb +66 -0
  39. data/test/sixarm_ruby_fab_test/email_test.rb +22 -0
  40. data/test/sixarm_ruby_fab_test/files_test.rb +106 -0
  41. data/test/sixarm_ruby_fab_test/forgery/geo_test.rb +0 -0
  42. data/test/sixarm_ruby_fab_test/forgery/uri_test.rb +0 -0
  43. data/test/sixarm_ruby_fab_test/geo_test.rb +34 -0
  44. data/test/sixarm_ruby_fab_test/id_test.rb +34 -0
  45. data/test/sixarm_ruby_fab_test/internet_test.rb +23 -0
  46. data/test/sixarm_ruby_fab_test/locale_test.rb +51 -0
  47. data/test/sixarm_ruby_fab_test/mime_test.rb +41 -0
  48. data/test/sixarm_ruby_fab_test/names_test.rb +47 -0
  49. data/test/sixarm_ruby_fab_test/password_test.rb +26 -0
  50. data/test/sixarm_ruby_fab_test/phone_test.rb +22 -0
  51. data/test/sixarm_ruby_fab_test/postal_test.rb +58 -0
  52. data/test/sixarm_ruby_fab_test/text_test.rb +58 -0
  53. data/test/sixarm_ruby_fab_test/time_test.rb +66 -0
  54. data/test/sixarm_ruby_fab_test/twitter_test.rb +98 -0
  55. data/test/sixarm_ruby_fab_test/username_test.rb +58 -0
  56. data/test/sixarm_ruby_fab_test/uuid_test.rb +34 -0
  57. metadata +159 -0
  58. metadata.gz.sig +3 -0
@@ -0,0 +1,34 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'minitest/autorun'
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+
6
+ describe Fab do
7
+
8
+ let(:fab){ Fab.new }
9
+
10
+ describe "#latitude" do
11
+
12
+ before do
13
+ @x = fab.latitude
14
+ end
15
+
16
+ it "is a float" do
17
+ @x.must_be_kind_of Float
18
+ end
19
+
20
+ end
21
+
22
+ describe "#longitude" do
23
+
24
+ before do
25
+ @x = fab.longitude
26
+ end
27
+
28
+ it "returns a float" do
29
+ @x.must_be_kind_of Float
30
+ end
31
+
32
+ end
33
+
34
+ end
@@ -0,0 +1,34 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'minitest/autorun'
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+
6
+ describe Fab do
7
+
8
+ let(:fab){ Fab.new }
9
+
10
+ describe "#id" do
11
+
12
+ before do
13
+ @x = fab.id
14
+ end
15
+
16
+ it "is an integer" do
17
+ @x.must_be_kind_of Fixnum
18
+ end
19
+
20
+ end
21
+
22
+ describe "#ids" do
23
+
24
+ before do
25
+ @x = fab.ids
26
+ end
27
+
28
+ it "is a list of integer items" do
29
+ @x.each{|x| x.must_be_kind_of Fixnum}
30
+ end
31
+
32
+ end
33
+
34
+ end
@@ -0,0 +1,23 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'minitest/autorun'
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+
6
+ describe Fab do
7
+
8
+ let(:fab){ Fab.new }
9
+
10
+ describe "#uri" do
11
+
12
+ before do
13
+ @x = fab.uri
14
+ end
15
+
16
+ it "is a string" do
17
+ @x.must_be_kind_of String
18
+ end
19
+
20
+ end
21
+
22
+ end
23
+
@@ -0,0 +1,51 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'minitest/autorun'
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+
6
+ describe Fab do
7
+
8
+ let(:fab){ Fab.new }
9
+
10
+ describe "#language_code" do
11
+
12
+ before do
13
+ @x = fab.language_code
14
+ end
15
+
16
+ it "is a string" do
17
+ @x.must_be_kind_of String
18
+ end
19
+
20
+ end
21
+
22
+ describe "#language_code_iso6391" do
23
+
24
+ before do
25
+ @x = fab.language_code_iso6391
26
+ end
27
+
28
+ it "is a string" do
29
+ @x.must_be_kind_of String
30
+ end
31
+
32
+ it "is in the list" do
33
+ fab.language_code_iso6391_list.must_include @x
34
+ end
35
+
36
+ end
37
+
38
+ describe "#language_code_iso6391_list" do
39
+
40
+ before do
41
+ @x = [:a, :b, :c]
42
+ end
43
+
44
+ it "gets and sets" do
45
+ fab.language_code_iso6391_list = @x
46
+ fab.language_code_iso6391_list.must_equal @x
47
+ end
48
+
49
+ end
50
+
51
+ end
@@ -0,0 +1,41 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'minitest/autorun'
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+
6
+ describe Fab do
7
+
8
+ let(:fab){ Fab.new }
9
+
10
+ describe "#content_type" do
11
+
12
+ before do
13
+ @x = fab.content_type
14
+ end
15
+
16
+ it "is a string" do
17
+ @x.must_be_kind_of String
18
+ end
19
+
20
+ it "has a slash" do
21
+ @x.must_match /\//
22
+ end
23
+
24
+ end
25
+
26
+ describe "#content_type_part" do
27
+
28
+ before do
29
+ @x = fab.content_type_part
30
+ end
31
+
32
+ it "is a string" do
33
+ @x.must_be_kind_of String
34
+ end
35
+
36
+ it "does not have a slash" do
37
+ @x.wont_match /\//
38
+ end
39
+ end
40
+
41
+ end
@@ -0,0 +1,47 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'minitest/autorun'
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+
6
+ describe Fab do
7
+
8
+ let(:fab){ Fab.new }
9
+
10
+ describe "#given_name" do
11
+
12
+ before do
13
+ @x = fab.given_name
14
+ end
15
+
16
+ it "is a string" do
17
+ fab.given_name.must_be_kind_of String
18
+ end
19
+
20
+ end
21
+
22
+ describe "#middle_name" do
23
+
24
+ before do
25
+ @x = fab.middle_name
26
+ end
27
+
28
+ it "is a string" do
29
+ @x.must_be_kind_of String
30
+ end
31
+
32
+ end
33
+
34
+ describe "#family_name" do
35
+
36
+ before do
37
+ @x = fab.family_name
38
+ end
39
+
40
+ it "is a string" do
41
+ @x.must_be_kind_of String
42
+ end
43
+
44
+ end
45
+
46
+ end
47
+
@@ -0,0 +1,26 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'minitest/autorun'
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+
6
+ describe Fab do
7
+
8
+ let(:fab){ Fab.new }
9
+
10
+ describe "#password" do
11
+
12
+ before do
13
+ @x = fab.password
14
+ end
15
+
16
+ it "is a string" do
17
+ @x.must_be_kind_of String
18
+ end
19
+
20
+ it "is gte nine characters" do
21
+ @x.size.must_be :>=, 9
22
+ end
23
+
24
+ end
25
+
26
+ end
@@ -0,0 +1,22 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'minitest/autorun'
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+
6
+ describe Fab do
7
+
8
+ let(:fab){ Fab.new }
9
+
10
+ describe "#phone" do
11
+
12
+ before do
13
+ @x = fab.phone
14
+ end
15
+
16
+ it "is a string" do
17
+ @x.must_be_kind_of String
18
+ end
19
+
20
+ end
21
+
22
+ end
@@ -0,0 +1,58 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'minitest/autorun'
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+
6
+ describe Fab do
7
+
8
+ let(:fab){ Fab.new }
9
+
10
+ describe "#street_address" do
11
+
12
+ before do
13
+ @x = fab.street_address
14
+ end
15
+
16
+ it "is a string" do
17
+ @x.must_be_kind_of String
18
+ end
19
+
20
+ end
21
+
22
+ describe "#city" do
23
+
24
+ before do
25
+ @x = fab.city
26
+ end
27
+
28
+ it "is a string" do
29
+ @x.must_be_kind_of String
30
+ end
31
+
32
+ end
33
+
34
+ describe "#usstate" do
35
+
36
+ before do
37
+ @x = fab.usstate
38
+ end
39
+
40
+ it "is a string" do
41
+ @x.must_be_kind_of String
42
+ end
43
+
44
+ end
45
+
46
+ describe "#uszip" do
47
+
48
+ before do
49
+ @x = fab.uszip
50
+ end
51
+
52
+ it "is a string" do
53
+ @x.must_be_kind_of String
54
+ end
55
+
56
+ end
57
+
58
+ end
@@ -0,0 +1,58 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'minitest/autorun'
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+
6
+ describe Fab do
7
+
8
+ let(:fab){ Fab.new }
9
+
10
+ describe "#name" do
11
+
12
+ before do
13
+ @x = fab.name
14
+ end
15
+
16
+ it "is a string" do
17
+ @x.must_be_kind_of String
18
+ end
19
+
20
+ end
21
+
22
+ describe "#note" do
23
+
24
+ before do
25
+ @x = fab.note
26
+ end
27
+
28
+ it "is a string" do
29
+ @x.must_be_kind_of String
30
+ end
31
+
32
+ end
33
+
34
+ describe "#description" do
35
+
36
+ before do
37
+ @x = fab.description
38
+ end
39
+
40
+ it "is a string" do
41
+ @x.must_be_kind_of String
42
+ end
43
+
44
+ end
45
+
46
+ describe "#lorem" do
47
+
48
+ before do
49
+ @x = fab.lorem
50
+ end
51
+
52
+ it "is a string" do
53
+ @x.must_be_kind_of String
54
+ end
55
+
56
+ end
57
+
58
+ end
@@ -0,0 +1,66 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'minitest/autorun'
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+
6
+ describe Fab do
7
+
8
+ let(:fab){ Fab.new }
9
+
10
+ describe "#time" do
11
+
12
+ before do
13
+ @x = fab.time
14
+ end
15
+
16
+ it "is a time" do
17
+ @x.must_be_kind_of Time
18
+ end
19
+
20
+ end
21
+
22
+ describe "#start_time" do
23
+
24
+ before do
25
+ @x = fab.start_time
26
+ end
27
+
28
+ it "returns a time" do
29
+ @x.must_be_kind_of Time
30
+ end
31
+ end
32
+
33
+ describe "#stop_time" do
34
+
35
+ before do
36
+ @x = fab.stop_time
37
+ end
38
+
39
+ it "returns a time" do
40
+ fab.stop_time.must_be_kind_of Time
41
+ end
42
+
43
+ end
44
+
45
+ describe "#start_time_and_stop_time" do
46
+
47
+ before do
48
+ @start, @stop = @x = fab.start_time_and_stop_time
49
+ end
50
+
51
+ it "is an array" do
52
+ @x.must_be_kind_of Array
53
+ end
54
+
55
+ it "contains a start time and stop time" do
56
+ @start.must_be_kind_of Time
57
+ @stop.must_be_kind_of Time
58
+ end
59
+
60
+ it "ensures start <= stop" do
61
+ @start.must_be :<=, @stop
62
+ end
63
+
64
+ end
65
+
66
+ end