first_gem_emilie 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5fd10376c037523d573650ff64f1a12145d385c6
4
- data.tar.gz: 2d94d6754712750d4329928982d756b8079f06ad
3
+ metadata.gz: 5097c7c2da8b99108cba27afcc52cf18ced74509
4
+ data.tar.gz: 4e6137945a29105c2f0034260d5413fd7a5c289f
5
5
  SHA512:
6
- metadata.gz: 690af34be720f236313779b830b45d6c33a9737d57f5bacaddd0f1c41d6d749fe6d008516e914048278465ac010fd41d16be99a5b983c5555732825646618a75
7
- data.tar.gz: 54d58f700f702204576f7418a9725fbf2243cbd030ed01c682b6ab4fc0077063a1e2d093cb9da1e6f571728d8542693098ea8cbaea1e3024fe9b0fc2d6b063db
6
+ metadata.gz: f5df13d63b493655bbb43b9008c8f5402bcf7d1ed2d465ead18f7eef641138b8b524cc537a3a87667869ed5da7aa43dbe45e77798c5d0a9932bb6c30d879421e
7
+ data.tar.gz: ea6e614c81f327462dc8c231a53cb60e0f722ca167386ac252bb04278f559677ad7f36958d90d2cbf57ea7d01e87e574cda6fcd436b3d2d72fb562781110955a
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
@@ -6,7 +6,7 @@ class String
6
6
  self.split.count
7
7
  end
8
8
 
9
- def unique_word
9
+ def unique_words
10
10
  self.split.uniq
11
11
  end
12
12
 
@@ -1,3 +1,3 @@
1
1
  module FirstGemEmilie
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -0,0 +1,39 @@
1
+ require 'spec_helper'
2
+
3
+ describe String do
4
+
5
+ describe '.word_count' do
6
+ it "should have a method word_count" do
7
+ should respond_to :word_count
8
+ end
9
+
10
+ it "should return 1 for a one word string" do
11
+ string = "apple"
12
+ expect(string.word_count).to eq 1
13
+ end
14
+
15
+ it "should return countr for a multiple word strings" do
16
+ string = "apple pear"
17
+ string2 = 'apple orange mango'
18
+ expect(string.word_count).to eq 2
19
+ expect(string2.word_count).to eq 3
20
+ end
21
+
22
+ end
23
+
24
+ describe '.unique_words' do
25
+ it 'should return an array of only unique words in string' do
26
+ string = "apple apple"
27
+ expect(string.unique_words.count).to eq 1
28
+ end
29
+
30
+ it 'should return an array of only unique words in string' do
31
+ string = "apple apple's galore"
32
+ expect(string.unique_words).to eq ["apple", "apple's", "galore"]
33
+ end
34
+
35
+
36
+ end
37
+
38
+
39
+ 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_emilie'
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_emilie
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
  - emreiser
@@ -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: For practice in GA WDI
42
56
  email:
43
57
  - emilie.reiser@gmail.com
@@ -46,6 +60,7 @@ extensions: []
46
60
  extra_rdoc_files: []
47
61
  files:
48
62
  - .gitignore
63
+ - .rspec
49
64
  - Gemfile
50
65
  - LICENSE.txt
51
66
  - README.md
@@ -53,6 +68,8 @@ files:
53
68
  - first_gem_emilie.gemspec
54
69
  - lib/first_gem_emilie.rb
55
70
  - lib/first_gem_emilie/version.rb
71
+ - spec/first_gem_emilie_spec.rb
72
+ - spec/spec_helper.rb
56
73
  homepage: ''
57
74
  licenses:
58
75
  - MIT
@@ -77,5 +94,7 @@ rubygems_version: 2.2.0
77
94
  signing_key:
78
95
  specification_version: 4
79
96
  summary: Test gem
80
- test_files: []
97
+ test_files:
98
+ - spec/first_gem_emilie_spec.rb
99
+ - spec/spec_helper.rb
81
100
  has_rdoc: