vedeu 0.0.30 → 0.0.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +4 -4
  3. data/lib/vedeu/configuration.rb +2 -2
  4. data/lib/vedeu/launcher.rb +2 -2
  5. data/lib/vedeu/models/command.rb +1 -1
  6. data/lib/vedeu/models/interface.rb +4 -0
  7. data/lib/vedeu/output/interface_renderer.rb +1 -1
  8. data/lib/vedeu/output/template.rb +23 -0
  9. data/lib/vedeu/output/text_adaptor.rb +1 -1
  10. data/lib/vedeu/process/process.rb +5 -1
  11. data/lib/vedeu/repository/command_repository.rb +3 -5
  12. data/lib/vedeu/repository/event_repository.rb +27 -0
  13. data/lib/vedeu/repository/interface_repository.rb +8 -6
  14. data/lib/vedeu/repository/storage.rb +2 -0
  15. data/lib/vedeu/support/esc.rb +2 -1
  16. data/lib/vedeu/support/geometry.rb +11 -23
  17. data/lib/vedeu/support/parser.rb +1 -1
  18. data/lib/vedeu/support/queue.rb +3 -1
  19. data/lib/vedeu.rb +18 -1
  20. data/test/example_app/bin/app +9 -0
  21. data/test/example_app/lib/app.rb +63 -0
  22. data/test/lib/vedeu/application_test.rb +6 -36
  23. data/test/lib/vedeu/configuration_test.rb +5 -31
  24. data/test/lib/vedeu/input/input_test.rb +4 -16
  25. data/test/lib/vedeu/launcher_test.rb +6 -15
  26. data/test/lib/vedeu/models/background_test.rb +5 -21
  27. data/test/lib/vedeu/models/colour_test.rb +18 -49
  28. data/test/lib/vedeu/models/command_test.rb +19 -83
  29. data/test/lib/vedeu/models/composition_test.rb +78 -175
  30. data/test/lib/vedeu/models/foreground_test.rb +4 -21
  31. data/test/lib/vedeu/models/interface_collection_test.rb +13 -45
  32. data/test/lib/vedeu/models/interface_test.rb +71 -195
  33. data/test/lib/vedeu/models/line_collection_test.rb +13 -52
  34. data/test/lib/vedeu/models/line_test.rb +17 -61
  35. data/test/lib/vedeu/models/presentation_test.rb +6 -19
  36. data/test/lib/vedeu/models/stream_collection_test.rb +10 -42
  37. data/test/lib/vedeu/models/stream_test.rb +16 -54
  38. data/test/lib/vedeu/models/style_collection_test.rb +1 -10
  39. data/test/lib/vedeu/output/interface_renderer_test.rb +7 -38
  40. data/test/lib/vedeu/output/output_test.rb +1 -18
  41. data/test/lib/vedeu/output/template.rb +20 -0
  42. data/test/lib/vedeu/output/text_adaptor_test.rb +9 -46
  43. data/test/lib/vedeu/process/process_test.rb +36 -38
  44. data/test/lib/vedeu/repository/command_repository_test.rb +16 -45
  45. data/test/lib/vedeu/repository/interface_repository_test.rb +36 -74
  46. data/test/lib/vedeu/repository/repository_test.rb +9 -33
  47. data/test/lib/vedeu/repository/storage_test.rb +7 -42
  48. data/test/lib/vedeu/support/esc_test.rb +46 -130
  49. data/test/lib/vedeu/support/event_repository_test.rb +31 -0
  50. data/test/lib/vedeu/support/exit_test.rb +1 -9
  51. data/test/lib/vedeu/support/geometry_test.rb +81 -105
  52. data/test/lib/vedeu/support/parser_test.rb +10 -54
  53. data/test/lib/vedeu/support/parsing/hash_parser_test.rb +18 -33
  54. data/test/lib/vedeu/support/parsing/json_parser_test.rb +4 -23
  55. data/test/lib/vedeu/support/queue_test.rb +33 -57
  56. data/test/lib/vedeu/support/terminal_test.rb +21 -52
  57. data/test/lib/vedeu/support/translator_test.rb +16 -33
  58. data/test/lib/vedeu/support/wordwrap_test.rb +29 -46
  59. data/test/lib/vedeu_test.rb +3 -5
  60. data/test/support/template.erb +3 -0
  61. data/test/test_helper.rb +1 -12
  62. data/vedeu.gemspec +8 -10
  63. metadata +26 -38
  64. data/lib/vedeu/support/events.rb +0 -21
  65. data/lib/vedeu/version.rb +0 -3
  66. data/test/lib/vedeu/support/events_test.rb +0 -45
  67. data/test/lib/vedeu/version_test.rb +0 -12
  68. data/test/support/output_1.json +0 -9
  69. data/test/support/output_1.rb +0 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fad9751a79b86fc406d103fe1882055758c9ca52
4
- data.tar.gz: 92d0385d33aee322dd606720acf85e2e892058e2
3
+ metadata.gz: 29a2d43ab7e7d773c5ad3fcd3d223462808fe191
4
+ data.tar.gz: 428e31c1b5fb377a92741f3cf7ccaeafd081fe24
5
5
  SHA512:
6
- metadata.gz: 1aa0f28cd2622a96f9bd39b0dfda454efc73e5fc330d6b7387cb74f041bc4b6725ccdd717166311dd4b9c8071b70de6cb50cc40bf6f429bd62a1d797496b9368
7
- data.tar.gz: 08607e602dfb5d7a89688069dee68e3a34acf8b3a2f8b725f6c3ecbbaddf8fd65004d1c44dae8a088531c08f108973c95c1288cd22d622a3fca5ba57c84b9991
6
+ metadata.gz: b19757abb7a24b5e3c27db48950075536bd3b85b1d6b448f0041fa206c91af01405e76618f3d5b7644da86d08b0c7cd7a30de2d3438354d755c4d436f11342de
7
+ data.tar.gz: 0feb617271ee83bf0f3caa26c7adfb294ac6651ddbd3aa014bf14ac2f660f746ae172e568e4cf0407320f63e9ac97c5a6b1eb890bc8cb3ea5d6dfc00ac08fc59
data/Rakefile CHANGED
@@ -1,10 +1,10 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
3
 
4
4
  Rake::TestTask.new(:minitest) do |t|
5
5
  t.libs << 'lib/vedeu'
6
- t.test_files = FileList["test/lib/vedeu/*_test.rb",
7
- "test/lib/vedeu/**/*_test.rb"]
6
+ t.test_files = FileList['test/lib/vedeu/*_test.rb',
7
+ 'test/lib/vedeu/**/*_test.rb']
8
8
  # t.options = '-v' # verbose mode
9
9
  end
10
10
 
@@ -7,7 +7,7 @@ module Vedeu
7
7
  end
8
8
 
9
9
  def initialize(args = [])
10
- @args = args || []
10
+ @args = args
11
11
  @options = {}
12
12
  end
13
13
 
@@ -15,7 +15,7 @@ module Vedeu
15
15
  parser = OptionParser.new do |opts|
16
16
  opts.banner = "Usage: #{$PROGRAM_NAME} [options]"
17
17
 
18
- opts.on("-1", "--run-once", "Run application once.") do
18
+ opts.on('-1', '--run-once', 'Run application once.') do
19
19
  @options[:interactive] = false
20
20
  end
21
21
  end
@@ -22,17 +22,17 @@ module Vedeu
22
22
  Application.start(configuration)
23
23
 
24
24
  @exit_code = 0
25
+ rescue StandardError => uncaught_exception
26
+ Vedeu.error(uncaught_exception)
25
27
  ensure
26
28
  $stdin, $stdout, $stderr = STDIN, STDOUT, STDERR
27
29
  @kernel.exit(@exit_code)
28
30
  end
29
- # :nocov:
30
31
 
31
32
  private
32
33
 
33
34
  attr_reader :argv
34
35
 
35
- # :nocov:
36
36
  def configuration
37
37
  Configuration.configure(argv)
38
38
  end
@@ -10,7 +10,7 @@ module Vedeu
10
10
  attribute :keypress, String, default: ''
11
11
  attribute :arguments, Array, default: []
12
12
 
13
- def execute(args = [])
13
+ def execute(*args)
14
14
  executable.call(*args)
15
15
  end
16
16
 
@@ -23,6 +23,10 @@ module Vedeu
23
23
  attribute :current, String, default: ''
24
24
  attribute :cursor, Boolean, default: true
25
25
 
26
+ def geometry
27
+ @geometry ||= Geometry.new(self)
28
+ end
29
+
26
30
  def refresh
27
31
  if enqueued?
28
32
  self.current = dequeue
@@ -48,7 +48,7 @@ module Vedeu
48
48
  end
49
49
 
50
50
  def origin(index)
51
- Geometry.origin(interface, index)
51
+ interface.geometry.origin(index)
52
52
  end
53
53
 
54
54
  def height
@@ -0,0 +1,23 @@
1
+ module Vedeu
2
+ class Template
3
+ def self.parse(object, path)
4
+ new(object, path).parse
5
+ end
6
+
7
+ def initialize(object, path)
8
+ @object, @path = object, path
9
+ end
10
+
11
+ def parse
12
+ ERB.new(load, nil, '-').result(binding)
13
+ end
14
+
15
+ private
16
+
17
+ attr_reader :object, :path
18
+
19
+ def load
20
+ File.read(File.dirname(__FILE__) + path)
21
+ end
22
+ end
23
+ end
@@ -13,7 +13,7 @@ module Vedeu
13
13
  def adapt
14
14
  return [] if no_content?
15
15
 
16
- lines.map { |line| Line.new({ streams: { text: line } }) }
16
+ lines.map { |line| { streams: { text: line } } }
17
17
  end
18
18
 
19
19
  private
@@ -11,7 +11,7 @@ module Vedeu
11
11
  def initialize; end
12
12
 
13
13
  def evaluate
14
- return false if input.nil? || input.empty?
14
+ return false if no_input?
15
15
 
16
16
  fail StopIteration if stop_requested?
17
17
 
@@ -28,6 +28,10 @@ module Vedeu
28
28
  result.nil? || result.empty?
29
29
  end
30
30
 
31
+ def no_input?
32
+ input.nil? || input.empty?
33
+ end
34
+
31
35
  def result
32
36
  @result ||= command.execute(*args) if command
33
37
  end
@@ -7,13 +7,11 @@ module Vedeu
7
7
  extend self
8
8
 
9
9
  def by_input(input)
10
- return nil unless input
11
-
12
10
  by_keypress(input) || by_keyword(input)
13
11
  end
14
12
 
15
13
  def create(attributes)
16
- super(Command.new(attributes))
14
+ super(entity.new(attributes))
17
15
  end
18
16
 
19
17
  def entity
@@ -23,11 +21,11 @@ module Vedeu
23
21
  private
24
22
 
25
23
  def by_keypress(input)
26
- query(entity, :keypress, input)
24
+ query(entity, :keypress, input) || false
27
25
  end
28
26
 
29
27
  def by_keyword(input)
30
- query(entity, :keyword, input)
28
+ query(entity, :keyword, input) || false
31
29
  end
32
30
  end
33
31
  end
@@ -0,0 +1,27 @@
1
+ module Vedeu
2
+ module EventRepository
3
+ extend self
4
+
5
+ def handlers
6
+ @handlers ||= Hash.new { |h, k| h[k] = [] }.merge(defaults)
7
+ end
8
+
9
+ def register(event, &block)
10
+ handlers[event] << block
11
+ end
12
+
13
+ def trigger(event, *args)
14
+ handlers[event].each do |handler|
15
+ handler.call(*args)
16
+ end
17
+ end
18
+
19
+ private
20
+
21
+ def defaults
22
+ {
23
+ :_exit_ => [ proc { :exit } ],
24
+ }
25
+ end
26
+ end
27
+ end
@@ -9,12 +9,12 @@ module Vedeu
9
9
  extend self
10
10
 
11
11
  def create(attributes = {})
12
- super(Interface.new(attributes))
12
+ super(entity.new(attributes))
13
13
  end
14
14
 
15
15
  def find(name)
16
16
  result = super
17
- raise UndefinedInterface unless result
17
+ fail UndefinedInterface, "#{name.to_s} could not be found." unless result
18
18
  result
19
19
  end
20
20
 
@@ -30,12 +30,14 @@ module Vedeu
30
30
  by_layer.map { |interface| interface.refresh }.compact
31
31
  end
32
32
 
33
- def by_layer
34
- all.sort_by { |interface| interface.z }
35
- end
36
-
37
33
  def entity
38
34
  Interface
39
35
  end
36
+
37
+ private
38
+
39
+ def by_layer
40
+ all.sort_by { |interface| interface.z }
41
+ end
40
42
  end
41
43
  end
@@ -25,6 +25,8 @@ module Vedeu
25
25
  end
26
26
 
27
27
  def query(entity, attribute, value)
28
+ return false if value.nil? || value.empty?
29
+
28
30
  map_for_class(entity).select do |_, result|
29
31
  return result if result.send(attribute) == value
30
32
  end
@@ -28,13 +28,14 @@ module Vedeu
28
28
  ["\e[", row, ';', column, 'H'].join
29
29
  end
30
30
 
31
- def string(value = 'normal')
31
+ def string(value = '')
32
32
  case value
33
33
  when 'blink' then "\e[5m"
34
34
  when 'blink_off' then "\e[25m"
35
35
  when 'bold' then "\e[1m"
36
36
  when 'bold_off' then "\e[21m"
37
37
  when 'clear' then "\e[2J"
38
+ when 'colour_reset' then "\e[38;2;39m\e[48;2;49m"
38
39
  when 'hide_cursor' then "\e[?25l"
39
40
  when 'negative' then "\e[7m"
40
41
  when 'positive' then "\e[27m"
@@ -3,18 +3,18 @@ require_relative 'terminal'
3
3
 
4
4
  module Vedeu
5
5
  class Geometry
6
- def self.origin(interface, index = 0)
7
- new(interface, index).origin
6
+ def initialize(interface)
7
+ @interface = interface
8
8
  end
9
9
 
10
- def initialize(interface, index = 0)
11
- @interface, @index = interface, index
12
- end
13
-
14
- def origin
10
+ def origin(index = 0)
15
11
  Esc.set_position(virtual_y(index), virtual_x)
16
12
  end
17
13
 
14
+ private
15
+
16
+ attr_reader :interface
17
+
18
18
  def virtual_x(index = 0)
19
19
  ((x..max_x).to_a)[index]
20
20
  end
@@ -24,8 +24,8 @@ module Vedeu
24
24
  end
25
25
 
26
26
  def max_y
27
- if ((y + height) > screen_height)
28
- screen_height
27
+ if (y + height) > Terminal.height
28
+ Terminal.height
29
29
 
30
30
  else
31
31
  (y + height)
@@ -34,8 +34,8 @@ module Vedeu
34
34
  end
35
35
 
36
36
  def max_x
37
- if ((x + width) > screen_width)
38
- screen_width
37
+ if (x + width) > Terminal.width
38
+ Terminal.width
39
39
 
40
40
  else
41
41
  (x + width)
@@ -43,10 +43,6 @@ module Vedeu
43
43
  end
44
44
  end
45
45
 
46
- private
47
-
48
- attr_reader :interface, :index
49
-
50
46
  def height
51
47
  interface.height
52
48
  end
@@ -62,13 +58,5 @@ module Vedeu
62
58
  def y
63
59
  interface.y
64
60
  end
65
-
66
- def screen_height
67
- @height ||= Terminal.height
68
- end
69
-
70
- def screen_width
71
- @width ||= Terminal.width
72
- end
73
61
  end
74
62
  end
@@ -6,7 +6,7 @@ module Vedeu
6
6
  class ParseError < StandardError; end
7
7
 
8
8
  class Parser
9
- def self.parse(output)
9
+ def self.parse(output = {})
10
10
  new(output).parse
11
11
  end
12
12
 
@@ -8,6 +8,8 @@ module Vedeu
8
8
 
9
9
  def enqueue(result)
10
10
  store.unshift(result)
11
+
12
+ self
11
13
  end
12
14
 
13
15
  def enqueued?
@@ -18,7 +20,7 @@ module Vedeu
18
20
  store.size
19
21
  end
20
22
 
21
- def clear
23
+ def reset
22
24
  store.clear
23
25
  end
24
26
 
data/lib/vedeu.rb CHANGED
@@ -3,9 +3,9 @@ require 'logger'
3
3
 
4
4
  require_relative 'vedeu/repository/command_repository'
5
5
  require_relative 'vedeu/repository/interface_repository'
6
+ require_relative 'vedeu/repository/event_repository'
6
7
  require_relative 'vedeu/support/exit'
7
8
  require_relative 'vedeu/launcher'
8
- require_relative 'vedeu/version'
9
9
 
10
10
  module Vedeu
11
11
  # :nocov:
@@ -20,6 +20,14 @@ module Vedeu
20
20
  .merge!(options))
21
21
  end
22
22
 
23
+ def event(name, &block)
24
+ EventRepository.register(name, &block)
25
+ end
26
+
27
+ def run(name, *args)
28
+ EventRepository.trigger(name, *args)
29
+ end
30
+
23
31
  private
24
32
 
25
33
  def stringify_symbols(value)
@@ -35,7 +43,15 @@ module Vedeu
35
43
  end
36
44
  end
37
45
 
46
+ def self.error(exception)
47
+ logger.debug "\e[38;5;196mError:\e[38;2;39m\e[48;2;49m " +
48
+ "#{exception.message}\n\n" +
49
+ exception.backtrace.join("\n")
50
+ end
51
+
38
52
  def self.debug(filename = 'profile.html', &block)
53
+ require 'ruby-prof'
54
+
39
55
  RubyProf.start
40
56
 
41
57
  yield
@@ -45,6 +61,7 @@ module Vedeu
45
61
 
46
62
  File.open(Vedeu.root_path + '/tmp/' + filename, 'w') do |file|
47
63
  RubyProf::CallStackPrinter.new(result).print(file)
64
+ # RubyProf::GraphPrinter.new(result).print(file)
48
65
  end
49
66
  end
50
67
 
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+ $:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib')
3
+
4
+ -> { its -> { a } }
5
+ trap('INT') { exit! }
6
+
7
+ require_relative '../lib/app'
8
+
9
+ Example::App.start
@@ -0,0 +1,63 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+ require 'vedeu'
4
+
5
+ module Example
6
+ extend self
7
+
8
+ class ExampleCommand
9
+ def self.dispatch
10
+ %Q|{
11
+ "interfaces": {
12
+ "name": "example",
13
+ "lines": {
14
+ "streams": [
15
+ {
16
+ "text": "Some text..."
17
+ },
18
+ {
19
+ "text": " "
20
+ },
21
+ {
22
+ "colour": {
23
+ "foreground": "#00ff00",
24
+ "background": "#0000ff"
25
+ },
26
+ "text": "The time is: #{Time.now}."
27
+ }
28
+ ]
29
+ }
30
+ }
31
+ }|
32
+ end
33
+ end
34
+
35
+ class App
36
+ include Vedeu
37
+
38
+ interface 'example', {
39
+ y: 1, x: 1, width: 80, height: 5,
40
+ colour: { background: '#ff0000', foreground: '#000000' },
41
+ cursor: false
42
+ }
43
+ interface 'command', {
44
+ y: 6, x: 1, width: 80, height: 1,
45
+ colour: { background: '#4040cc', foreground: '#aadd00' },
46
+ cursor: true
47
+ }
48
+ command 'time', {
49
+ entity: ExampleCommand,
50
+ keyword: 'time',
51
+ keypress: 't'
52
+ }
53
+ command 'exit', {
54
+ entity: Vedeu::Exit,
55
+ keyword: 'exit',
56
+ keypress: 'q'
57
+ }
58
+
59
+ def self.start
60
+ Vedeu::Launcher.new([]).execute!
61
+ end
62
+ end
63
+ end
@@ -3,45 +3,15 @@ require_relative '../../../lib/vedeu/application'
3
3
 
4
4
  module Vedeu
5
5
  describe Application do
6
- let(:described_class) { Application }
7
- let(:described_instance) { described_class.new(options) }
8
- let(:options) { {} }
9
-
10
- describe '#initialize' do
11
- let(:subject) { described_class.new(options) }
12
-
13
- it 'returns an Application instance' do
14
- subject.must_be_instance_of(Application)
15
- end
16
- end
17
-
18
6
  describe '.start' do
19
- let(:subject) { described_class.start(options) }
20
-
21
- before do
22
- Terminal.stubs(:open).yields(self)
23
- Output.stubs(:render)
24
- Input.stubs(:capture)
25
- Process.stubs(:evaluate)
26
- Terminal.stubs(:close)
7
+ it 'returns a NilClass when the application should run interactively' do
8
+ skip
9
+ # Application.start({ interactive: true }).must_be_instance_of(NilClass)
27
10
  end
28
11
 
29
- context 'when the application should run interactively' do
30
- let(:options) { { interactive: true } }
31
-
32
- before { Process.stubs(:evaluate).raises(StopIteration) }
33
-
34
- it 'returns a NilClass' do
35
- subject.must_be_instance_of(NilClass)
36
- end
37
- end
38
-
39
- context 'when the application should run once' do
40
- let(:options) { { interactive: false } }
41
-
42
- it 'returns a NilClass' do
43
- subject.must_be_instance_of(NilClass)
44
- end
12
+ it 'returns a NilClass when the application should run once' do
13
+ skip
14
+ # Application.start({ interactive: false }).must_be_instance_of(NilClass)
45
15
  end
46
16
  end
47
17
  end
@@ -3,40 +3,14 @@ require_relative '../../../lib/vedeu/configuration'
3
3
 
4
4
  module Vedeu
5
5
  describe Configuration do
6
- let(:described_class) { Configuration }
7
- let(:described_instance) { described_class.new(args) }
8
- let(:args) { [] }
9
- let(:subject) { described_instance }
10
-
11
- describe '#initialize' do
12
- let(:subject) { described_instance }
13
-
14
- it 'returns a Configuration instance' do
15
- subject.must_be_instance_of(Configuration)
16
- end
17
-
18
- it 'sets an instance variable' do
19
- subject.instance_variable_get('@args').must_equal([])
20
- end
21
-
22
- it 'sets an instance variable' do
23
- subject.instance_variable_get('@options').must_equal({})
24
- end
25
- end
26
-
27
6
  describe '#configure' do
28
- let(:subject) { described_class.configure(args) }
29
-
30
- it 'returns a Hash' do
31
- subject.must_be_instance_of(Hash)
7
+ it 'returns an empty collection when no options are set' do
8
+ Configuration.configure([]).must_equal({})
32
9
  end
33
10
 
34
- context 'when the option is --run-once' do
35
- let(:args) { ['--run-once'] }
36
-
37
- it 'returns the options which instructs Vedeu to run once' do
38
- subject.must_equal({ interactive: false })
39
- end
11
+ it 'returns the options which instructs Vedeu to run once' do
12
+ Configuration.configure(['--run-once'])
13
+ .must_equal({ interactive: false })
40
14
  end
41
15
  end
42
16
  end
@@ -3,23 +3,11 @@ require_relative '../../../../lib/vedeu/input/input'
3
3
 
4
4
  module Vedeu
5
5
  describe Input do
6
- let(:described_module) { Input }
7
- let(:input) { 'input' }
8
-
9
- before do
10
- Terminal.stubs(:input).returns(input)
11
- Queue.stubs(:enqueue).returns([input])
12
- end
13
-
14
6
  describe '.capture' do
15
- let(:subject) { described_module.capture }
16
-
17
- it 'returns an Array' do
18
- subject.must_be_instance_of(Array)
19
- end
20
-
21
- it 'returns the enqueued input' do
22
- subject.must_equal([input])
7
+ it 'enqueues the captured input from the terminal' do
8
+ Terminal.stub :input, 'input' do
9
+ Input.capture.must_equal(Vedeu::Queue)
10
+ end
23
11
  end
24
12
  end
25
13
  end
@@ -3,22 +3,13 @@ require_relative '../../../lib/vedeu/launcher'
3
3
 
4
4
  module Vedeu
5
5
  describe Launcher do
6
- let(:described_class) { Launcher }
7
- let(:described_instance) { described_class.new(argv) }
8
- let(:argv) { [] }
9
-
10
- before { Application.stubs(:start) }
11
-
12
- describe '#initialize' do
13
- let(:subject) { described_class.new(argv) }
14
-
15
- it 'returns a Launcher instance' do
16
- subject.must_be_instance_of(Launcher)
17
- end
18
- end
19
-
20
6
  describe '#execute!' do
21
- let(:subject) { described_instance.execute! }
7
+ it 'needs a spec, please write one.' do
8
+ skip
9
+ Application.stub :start, nil do
10
+ Launcher.new([]).execute!
11
+ end
12
+ end
22
13
  end
23
14
  end
24
15
  end