first_gem_best_carl 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f6946dc504ae7d54e45a50f77fd8bd735e64cbd
4
- data.tar.gz: 7ea77c4fd59f9045270e3f408a07c4947d31ed99
3
+ metadata.gz: b0c201d1cbf961cd8ebfe4d5b61e865ecb1ac547
4
+ data.tar.gz: 13582b93a7a597649e14106d6e6c0cb3729ccf14
5
5
  SHA512:
6
- metadata.gz: 8321a2cf1366880cf3db8d835923692af6ca4c18cd3c25bf041746796ce6a7e34ce0bdc4f162420e738858654b180471c1c97fafafd17581a14369d8cac5fb8f
7
- data.tar.gz: 23c1e7dd8a700d49765e4daf0ad4f0b2873641800520c543bb63f935cd33ee10fba54b28fde2da57acee3e1a6d52cd269ceea674f5437bba69bb0ea678a117da
6
+ metadata.gz: ecbfb191f89d8205e0427fdd2206a55cc3596d19b94cc03dccc9e4d7d05db98cba2b188a4adc901c4facffca682e9492fa67f428cf91e1754337608aab83cf79
7
+ data.tar.gz: d35f316318c5c3537231723f952ca3e1b919ec2d9064667d831a2a4d9adaf0bffd3016078d4490c2e174a3e38c83c4420ea6fe324b2146e06041a67e6c9d4dc5
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
@@ -20,4 +20,5 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.5"
22
22
  spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "rspec", "~> 3.0.0.beta"
23
24
  end
@@ -1,3 +1,3 @@
1
1
  module FirstGemBestCarl
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -0,0 +1,37 @@
1
+ require 'spec_helper'
2
+
3
+ describe String do
4
+ describe '#word_count' do
5
+ it 'should return 1 when the string is one word long' do
6
+ a_string = "apple"
7
+ expect(a_string.word_count).to eq(1)
8
+ end
9
+
10
+ it 'should return 3 when the string is three words long' do
11
+ a_string = "apples are delicious"
12
+ expect(a_string.word_count).to eq(3)
13
+ end
14
+ end
15
+
16
+ describe '#unique_words' do
17
+ it 'should return the correct 3 words when the string is three unique words' do
18
+ a_string = "mangos are wonderful"
19
+ expect(a_string.unique_words).to match_array ["mangos", "are", "wonderful"]
20
+ end
21
+
22
+ it 'should return 1 word when the string is duplicated words' do
23
+ a_string = "HODOR HODOR HODOR"
24
+ expect(a_string.unique_words).to match_array ["HODOR"]
25
+ end
26
+
27
+ it 'should return an empty array when the string is empty' do
28
+ a_string = ""
29
+ expect(a_string.unique_words).to match_array []
30
+ end
31
+
32
+ it 'should return only the unique words for partial duplicates' do
33
+ a_string = "hello world hello hi!"
34
+ expect(a_string.unique_words).to match_array ["hello", "world", "hi!"]
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,12 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ require 'rspec'
4
+ require 'first_gem_best_carl'
5
+
6
+ # Requires supporting files with custom matchers and macros, etc,
7
+ # in ./support/ and its subdirectories.
8
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
9
+
10
+ RSpec.configure do |config|
11
+
12
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: first_gem_best_carl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Prescott Murphy
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 3.0.0.beta
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 3.0.0.beta
41
55
  description: This is the best carl gem. I cannot in good conscience advise using other
42
56
  carl gems.
43
57
  email:
@@ -47,6 +61,7 @@ extensions: []
47
61
  extra_rdoc_files: []
48
62
  files:
49
63
  - ".gitignore"
64
+ - ".rspec"
50
65
  - Gemfile
51
66
  - LICENSE.txt
52
67
  - README.md
@@ -54,6 +69,8 @@ files:
54
69
  - first_gem_best_carl.gemspec
55
70
  - lib/first_gem_best_carl.rb
56
71
  - lib/first_gem_best_carl/version.rb
72
+ - spec/first_gem_best_carl_spec.rb
73
+ - spec/spec_helper.rb
57
74
  homepage: ''
58
75
  licenses:
59
76
  - MIT
@@ -78,4 +95,6 @@ rubygems_version: 2.2.0
78
95
  signing_key:
79
96
  specification_version: 4
80
97
  summary: My first gem. Doesn't do much.
81
- test_files: []
98
+ test_files:
99
+ - spec/first_gem_best_carl_spec.rb
100
+ - spec/spec_helper.rb