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 +4 -4
- data/.rspec +2 -0
- data/first_gem_emilie.gemspec +1 -0
- data/lib/first_gem_emilie.rb +1 -1
- data/lib/first_gem_emilie/version.rb +1 -1
- data/spec/first_gem_emilie_spec.rb +39 -0
- data/spec/spec_helper.rb +12 -0
- metadata +21 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5097c7c2da8b99108cba27afcc52cf18ced74509
|
4
|
+
data.tar.gz: 4e6137945a29105c2f0034260d5413fd7a5c289f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5df13d63b493655bbb43b9008c8f5402bcf7d1ed2d465ead18f7eef641138b8b524cc537a3a87667869ed5da7aa43dbe45e77798c5d0a9932bb6c30d879421e
|
7
|
+
data.tar.gz: ea6e614c81f327462dc8c231a53cb60e0f722ca167386ac252bb04278f559677ad7f36958d90d2cbf57ea7d01e87e574cda6fcd436b3d2d72fb562781110955a
|
data/.rspec
ADDED
data/first_gem_emilie.gemspec
CHANGED
data/lib/first_gem_emilie.rb
CHANGED
@@ -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
|
data/spec/spec_helper.rb
ADDED
@@ -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.
|
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:
|