samjones-calculator 0.0.0 → 0.0.1

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: a6261330f0e5c14d2a71ee7827a70d86bf5892a6
4
- data.tar.gz: 5cfa35a3ee86e173f1a78511e19e146fc787c009
3
+ metadata.gz: 450579aba0c0d50d4f55a692db441e15b278abd8
4
+ data.tar.gz: 9b7b92648664b1e93463eedc984330dd17641f08
5
5
  SHA512:
6
- metadata.gz: aa1aa6f639d4bee4dd46575b968b5ecdff7803b97a7f364f8bda936653dd054f5bb0c71d3d39e84257aa1418d999e165f6966e10e8ab014f845dca523cef0622
7
- data.tar.gz: 642f8096a939e3b13e4883704fffa73eff3897184450b2de1ddbb060a59e19f048f6352e740e2e09001911e5ce0db909a1a5603c367a3121b5c397611c3f8a72
6
+ metadata.gz: f7cc190c53a504282bfbd468f517bc7c849ba5163924baa0e58dca4a52cfee89f19390da33d439e1bd509bdc4d6cfab13c5c1ec10679918a65648625723d1086
7
+ data.tar.gz: d0e8262c13b58257e4282f0541ce47f745da9c1dad0eedcde022f606d40ac6dd27f2db529ec58c561b5164ba2e99195db34372ecb38715bcd98d042b773ae820
data/Rakefile CHANGED
@@ -1,2 +1,12 @@
1
1
  require "bundler/gem_tasks"
2
2
 
3
+ require 'rake'
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec) do |t|
7
+ t.pattern = Dir.glob('spec/**/*_spec.rb')
8
+ t.rspec_opts = '--format documentation'
9
+ end
10
+
11
+ task :install => :spec
12
+
@@ -1,4 +1,5 @@
1
1
  require 'calculator/string_calculator'
2
+ require 'tokenizer/tokenizer'
2
3
 
3
4
  def tokenizer(test)
4
5
  tokenizer = instance_double('Tokenizer')
@@ -28,6 +29,12 @@ describe 'StringCalculator' do
28
29
  :string => '10',
29
30
  :ints => [10],
30
31
  :result => 20
32
+ },
33
+ {
34
+ :initial_value => 10,
35
+ :string => '0',
36
+ :ints => [0],
37
+ :result => 10
31
38
  }
32
39
  ].each { |test|
33
40
  expect(StringCalculator.new(test[:initial_value], tokenizer(test)).add(test[:string]).value).to eq(test[:result])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: samjones-calculator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Jones
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rspec
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +52,34 @@ dependencies:
38
52
  - - ">="
39
53
  - !ruby/object:Gem::Version
40
54
  version: 2.0.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: guard
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 2.1.1
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 2.1.1
69
+ - !ruby/object:Gem::Dependency
70
+ name: guard-rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
41
83
  description: String Calculator written for kata http://osherove.com/tdd-kata-1/
42
84
  email:
43
85
  - sam@samljones.com