lucid 0.4.1 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -3
  3. data/HISTORY.md +12 -0
  4. data/LICENSE +0 -3
  5. data/README.md +7 -5
  6. data/Rakefile +0 -14
  7. data/lib/lucid.rb +4 -0
  8. data/lib/lucid/cli/app.rb +1 -5
  9. data/lib/lucid/cli/context.rb +8 -6
  10. data/lib/lucid/cli/profile.rb +9 -9
  11. data/lib/lucid/context.rb +1 -1
  12. data/lib/lucid/interface_rb/matcher.rb +1 -2
  13. data/lib/lucid/platform.rb +2 -1
  14. data/lucid.gemspec +12 -12
  15. data/spec/lucid/lucid_spec.rb +7 -0
  16. data/spec/spec_helper.rb +0 -19
  17. metadata +34 -116
  18. data/.travis.yml +0 -15
  19. data/lib/lucid/sequence.rb +0 -5
  20. data/lib/lucid/sequence/sequence_errors.rb +0 -64
  21. data/lib/lucid/sequence/sequence_group.rb +0 -35
  22. data/lib/lucid/sequence/sequence_phrase.rb +0 -166
  23. data/lib/lucid/sequence/sequence_steps.rb +0 -20
  24. data/lib/lucid/sequence/sequence_support.rb +0 -26
  25. data/lib/lucid/sequence/sequence_template.rb +0 -354
  26. data/spec/lucid/ansicolor_spec.rb +0 -31
  27. data/spec/lucid/app_spec.rb +0 -82
  28. data/spec/lucid/ast/background_spec.rb +0 -128
  29. data/spec/lucid/ast/doc_string_spec.rb +0 -36
  30. data/spec/lucid/ast/feature_spec.rb +0 -66
  31. data/spec/lucid/ast/outline_table_spec.rb +0 -21
  32. data/spec/lucid/ast/scenario_outline_spec.rb +0 -81
  33. data/spec/lucid/ast/specs_spec.rb +0 -48
  34. data/spec/lucid/ast/step_invocation_spec.rb +0 -45
  35. data/spec/lucid/ast/step_spec.rb +0 -72
  36. data/spec/lucid/ast/table_spec.rb +0 -265
  37. data/spec/lucid/ast/tdl_factory.rb +0 -78
  38. data/spec/lucid/ast/tdl_walker_spec.rb +0 -21
  39. data/spec/lucid/context_spec.rb +0 -328
  40. data/spec/lucid/duration_spec.rb +0 -22
  41. data/spec/lucid/facade_spec.rb +0 -31
  42. data/spec/lucid/factory_spec.rb +0 -16
  43. data/spec/lucid/matcher_spec.rb +0 -127
  44. data/spec/lucid/options_spec.rb +0 -346
  45. data/spec/lucid/orchestrator_spec.rb +0 -117
  46. data/spec/lucid/pending_spec.rb +0 -45
  47. data/spec/lucid/progress_spec.rb +0 -34
  48. data/spec/lucid/rb_step_definition_spec.rb +0 -127
  49. data/spec/lucid/rb_transform_spec.rb +0 -24
  50. data/spec/lucid/regexp_argument_matcher_spec.rb +0 -19
  51. data/spec/lucid/results_spec.rb +0 -81
  52. data/spec/lucid/runtime_spec.rb +0 -38
  53. data/spec/lucid/sequences/sequence_conditional_spec.rb +0 -74
  54. data/spec/lucid/sequences/sequence_group_spec.rb +0 -55
  55. data/spec/lucid/sequences/sequence_phrase_spec.rb +0 -122
  56. data/spec/lucid/sequences/sequence_placeholder_spec.rb +0 -56
  57. data/spec/lucid/sequences/sequence_section_spec.rb +0 -61
  58. data/spec/lucid/sequences/sequence_support_spec.rb +0 -65
  59. data/spec/lucid/sequences/sequence_template_spec.rb +0 -298
  60. data/spec/lucid/step_match_spec.rb +0 -55
@@ -1,55 +0,0 @@
1
- require 'spec_helper'
2
-
3
- require 'lucid/interface_rb/rb_language'
4
- require 'lucid/interface_rb/rb_step_definition'
5
-
6
- module Lucid
7
- describe StepMatch do
8
-
9
- WORD = '[[:word:]]'
10
-
11
- before do
12
- @rb_code = InterfaceRb::RbLanguage.new(nil)
13
- end
14
-
15
- def testdef(regexp)
16
- InterfaceRb::RbStepDefinition.new(@rb_code, regexp, lambda{}, {})
17
- end
18
-
19
- def step_match(regexp, name)
20
- testdef = testdef(regexp)
21
- StepMatch.new(testdef, name, nil, testdef.arguments_from(name))
22
- end
23
-
24
- it 'should format groups with format string' do
25
- result = step_match(/Lucid (#{WORD}+) (\d+) (#{WORD}+) this (#{WORD}+)/, 'Lucid parsed 10 tests this build')
26
- result.format_args('<span>%s</span>').should == 'Lucid <span>parsed</span> <span>10</span> <span>tests</span> this <span>build</span>'
27
- end
28
-
29
- it 'should format groups with format string when there are duplications' do
30
- result = step_match(/Lucid (#{WORD}+) (\d+) (#{WORD}+) this (#{WORD}+)/, 'Lucid testing 1 tester this test')
31
- result.format_args('<span>%s</span>').should == 'Lucid <span>testing</span> <span>1</span> <span>tester</span> this <span>test</span>'
32
- end
33
-
34
- it 'should format groups with block' do
35
- result = step_match(/Lucid (#{WORD}+) (\d+) (#{WORD}+) this (#{WORD}+)/, 'Lucid parsed 1 test this build')
36
- result.format_args(&lambda{|m| "<span>#{m}</span>"}).should == 'Lucid <span>parsed</span> <span>1</span> <span>test</span> this <span>build</span>'
37
- end
38
-
39
- it 'should format groups with proc object' do
40
- result = step_match(/Lucid (#{WORD}+) (\d+) (#{WORD}+) this (#{WORD}+)/, 'Lucid parsed 1 test this build')
41
- result.format_args(lambda{|m| "<span>#{m}</span>"}).should == 'Lucid <span>parsed</span> <span>1</span> <span>test</span> this <span>build</span>'
42
- end
43
-
44
- it 'should format groups even when the first group is optional and not matched' do
45
- result = step_match(/should( not)? show message '([^']*?)'$/, "App should show message 'Login failed.'")
46
- result.format_args('<span>%s</span>').should == "App should show message '<span>Login failed.</span>'"
47
- end
48
-
49
- it 'should format embedded groups' do
50
- result = step_match(/running( (\d+) scenarios)? (\d+) tests/, 'running 5 scenarios 10 tests')
51
- result.format_args('<span>%s</span>').should == 'running<span> 5 scenarios</span> <span>10</span> tests'
52
- end
53
-
54
- end
55
- end