speedflow-plugin-test 0.3.0 → 0.3.2

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: cf8aa0e2526dac196dd60aa3340d9ab78cc16936
4
- data.tar.gz: 409df4d02a062c9d92f87a21c3af5a628833ca7f
3
+ metadata.gz: 4fa094a332b4d9ab2f537463e305ad476c2cb085
4
+ data.tar.gz: 72060d80d61c56da36677ff3b2f0eac470d5c764
5
5
  SHA512:
6
- metadata.gz: ea62b0e26cd41e67281d976cd4df2ce92b4eb1dab1866c68f0e6e8632ac62cb5856f44d7a33ed3ac2ba87ef371b71a9223a794086fd8509643dc1cff69bc42d5
7
- data.tar.gz: f314a3e157f99446831116649d0e60d0b72ea48286b7cf49db2708068d20c39933079e51b638d12cf1c1c85f093b15ae82d098152735ab7d52929b6f33da19fe
6
+ metadata.gz: ea5b16c020eedc1779953588ac38ab7085597a18cb4497431d59bae4b8db205545a16d3ae5caaf4ca427900b779dfeb79297a761dd43bc0eec2293cad0ff2749
7
+ data.tar.gz: 794fe929a64b8b1c539b4e6c358326033bd07a65dcb3b2a9aefee73a460a642f2663e6856cba79d1cf13de8fd9ea8cc7f68d7713b8ca71629bb7e15508ae15f7
@@ -12,6 +12,7 @@ module Speedflow
12
12
  # Public: Constructor
13
13
  #
14
14
  # config - Speedflow::Plugin::Configuration object.
15
+ # prompt - Speedflow::Plugin::Prompt object.
15
16
  #
16
17
  # Examples
17
18
  #
@@ -24,19 +25,11 @@ module Speedflow
24
25
  @prompt = prompt
25
26
  end
26
27
 
27
- # Public: Method missing
28
- #
29
- # Method used to catch others methods to test.
30
- #
31
- # args - Some arguments :)
28
+ # Public: Method to test
32
29
  #
33
30
  # Returns Hash of arguments.
34
- def method_missing(*args)
35
- action = args.first
36
-
37
- raise NoMethodError if action.to_s == 'action_no_method'
38
-
39
- @prompt.warn " - Pong: #{action}"
31
+ def test
32
+ @prompt.warn ' - Pong: test'
40
33
  @prompt.warn " Config: #{@config.all_config}"
41
34
  @prompt.warn " Input: #{@config.all_input}"
42
35
 
@@ -1,7 +1,7 @@
1
1
  module Speedflow
2
2
  module Plugin
3
3
  module Test
4
- VERSION = '0.3.0'.freeze
4
+ VERSION = '0.3.2'.freeze
5
5
  end
6
6
  end
7
7
  end
@@ -3,16 +3,16 @@ require 'spec_helper'
3
3
  describe Speedflow::Plugin::Test::Plugin do
4
4
  let(:plugin) { ::Speedflow::Plugin::Test::Plugin.new(double, double) }
5
5
 
6
- it '.method_missing' do
7
- allow(plugin.prompt).to receive(:warn).with(' - Pong: foo')
6
+ it '.test' do
7
+ allow(plugin.prompt).to receive(:warn).with(' - Pong: test')
8
8
  allow(plugin.config).to receive(:all_config)
9
9
  allow(plugin.prompt).to receive(:warn)
10
- allow(plugin.config).to receive(:all_input)
10
+ allow(plugin.config).to receive(:all_input).and_return(hello: 'world')
11
11
  allow(plugin.prompt).to receive(:warn)
12
12
 
13
- plugin.foo(bar: 'baz')
13
+ plugin.test
14
14
 
15
- expect { plugin.action_no_method(bar: 'baz') }
16
- .to raise_error(NoMethodError)
15
+ expect(plugin.test)
16
+ .to eq(hello: 'world')
17
17
  end
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: speedflow-plugin-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Breux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-06 00:00:00.000000000 Z
11
+ date: 2016-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler