konami-fo 0.0.1 → 0.0.2

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: 033a923e7cf881327439343b8cf7ed6955bea3f5
4
- data.tar.gz: a7cf1bef44bfdfca29985f5057dbcabb16e30dc9
3
+ metadata.gz: 389d7468cafd224b987a49811c936fa5ea06acfe
4
+ data.tar.gz: f872117043fff46e6d3bc2a881784bc8a7ec5e51
5
5
  SHA512:
6
- metadata.gz: fb9a5f17abc09a82787668b4381b61fe2a32618274982db59377137d672975500b441733fe2fe484941479a3f5f285fe668cfc6d6a92198eec442d2d66eff26c
7
- data.tar.gz: c1edf99c50a8656eb6761c477af1b8e430eae49261eecfc85f6c3f85ce3ab21cb9c9718d88b46ac1fd1f2d579461fec8e42d6fb2b338cb22480a3b60935c7c85
6
+ metadata.gz: 9edba2060a11d5b2bada84351ac4f338a8317852379097339cfea370764cb1c300e12dd0620026f145c0ba655ed78c808a08ac133204d08ee6a4b083d5044f8f
7
+ data.tar.gz: fa193b2411eabab7ffd22c8ad6656aa1f02c82d56c538e7caa7cececcb3750a72d6d1db5c937313dff0eb5e82be59164a3ba5129204cf6a2b4d8d23eb95a0fd5
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - "2.0.0"
4
+ script: bundle exec rake test
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Konami::Fo
1
+ ## Konami::Fo [![Code Climate](https://codeclimate.com/github/rthbound/konami-fo.png)](https://codeclimate.com/github/rthbound/konami-fo)
2
2
 
3
3
  Enter the Konami code, then 'eff off.
4
4
 
data/Rakefile CHANGED
@@ -1 +1,9 @@
1
1
  require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new do |t|
5
+ t.pattern = 'test/**/*_test.rb'
6
+ t.libs.push 'test'
7
+ end
8
+
9
+ task :default => :test
@@ -23,5 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.add_runtime_dependency "konamio"
24
24
  spec.add_runtime_dependency "foaas"
25
25
  spec.add_development_dependency "rake"
26
+ spec.add_development_dependency "coveralls"
27
+ spec.add_development_dependency "minitest"
26
28
  spec.add_development_dependency "pry"
27
29
  end
@@ -1,3 +1,3 @@
1
1
  module Konami
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -0,0 +1,55 @@
1
+ require "minitest_helper"
2
+
3
+ describe Konami::Fo do
4
+ before do
5
+ @subject = Konami::Fo
6
+ @konamio_params = {
7
+ input: @input = MiniTest::Mock.new,
8
+ output: @output = MiniTest::Mock.new,
9
+ prompt: @prompt = "Foo diddly doobardy party hardy",
10
+ listener: @listener = MiniTest::Mock.new,
11
+ speaker: @speaker = MiniTest::Mock.new,
12
+ sequence: @sequence = ["a"],
13
+ confirmation: @confirmation = "Good job, you."
14
+ }
15
+
16
+ @speaker_instance = MiniTest::Mock.new
17
+ @speaker_result = MiniTest::Mock.new
18
+ @speaker_instance.expect(:execute!, @speaker_result)
19
+ @speaker_instance.expect(:execute!, @speaker_result)
20
+
21
+ @listener_instance = MiniTest::Mock.new
22
+ @listener_result = MiniTest::Mock.new
23
+ @listener_instance.expect(:execute!, @listener_result)
24
+ @listener_instance.expect(:execute!, @listener_result)
25
+
26
+ @speaker.expect(:new, @speaker_instance, [{ prompt: @prompt, output: @output }])
27
+ @listener.expect(:new, @listener_instance, [{ sequence: @sequence, input: @input }])
28
+ @data_hash = MiniTest::Mock.new
29
+ @listener_result.expect(:data, @data_hash)
30
+ @data_hash.expect(:[], ["a"], [:sequence])
31
+
32
+ @speaker.expect(:new, @speaker_instance, [{ prompt: @prompt, output: @output }])
33
+ @listener.expect(:new, @listener_instance, [{ sequence: @sequence, input: @input }])
34
+ @data_hash = MiniTest::Mock.new
35
+ @listener_result.expect(:data, @data_hash)
36
+ @data_hash.expect(:[], [], [:sequence])
37
+
38
+ @speaker_confirmation_instance = MiniTest::Mock.new
39
+ @speaker_confirmation_result = MiniTest::Mock.new
40
+ @speaker.expect(:new, @speaker_confirmation_instance, [{ prompt: @confirmation, output: @output }])
41
+ @speaker_confirmation_instance.expect(:execute!, @speaker_confirmation_result)
42
+ end
43
+
44
+ it "can be initialized" do
45
+ @subject.must_respond_to :new
46
+ end
47
+
48
+ it "can be initialized without arguments" do
49
+ @subject.new().must_respond_to :execute!
50
+ end
51
+
52
+ it "must return a result object" do
53
+ assert @subject.new(konamio_params: @konamio_params).execute!.successful?
54
+ end
55
+ end
@@ -0,0 +1,16 @@
1
+ # Testing frameworks
2
+ require 'coveralls'
3
+ Coveralls.wear!
4
+ #require 'simplecov'
5
+ #SimpleCov.start
6
+
7
+ require "minitest/autorun"
8
+
9
+ # Debugger
10
+ require "pry"
11
+
12
+ # The gem
13
+ $: << File.dirname(__FILE__) + "/../lib"
14
+ $: << File.dirname(__FILE__)
15
+
16
+ require "konami/fo"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: konami-fo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan T. Hosford
@@ -80,6 +80,34 @@ dependencies:
80
80
  - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: coveralls
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: minitest
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
83
111
  - !ruby/object:Gem::Dependency
84
112
  name: pry
85
113
  requirement: !ruby/object:Gem::Requirement
@@ -102,6 +130,7 @@ extensions: []
102
130
  extra_rdoc_files: []
103
131
  files:
104
132
  - .gitignore
133
+ - .travis.yml
105
134
  - Gemfile
106
135
  - LICENSE.txt
107
136
  - README.md
@@ -109,6 +138,8 @@ files:
109
138
  - konami-fo.gemspec
110
139
  - lib/konami/fo.rb
111
140
  - lib/konami/version.rb
141
+ - test/konami/fo_test.rb
142
+ - test/minitest_helper.rb
112
143
  homepage: ''
113
144
  licenses:
114
145
  - MIT
@@ -133,4 +164,6 @@ rubygems_version: 2.0.3
133
164
  signing_key:
134
165
  specification_version: 4
135
166
  summary: Enter the Konami code and 'eff off promptly.
136
- test_files: []
167
+ test_files:
168
+ - test/konami/fo_test.rb
169
+ - test/minitest_helper.rb