mspec 1.7.0 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +9 -7
  3. data/lib/mspec/commands/mspec.rb +0 -8
  4. data/lib/mspec/guards/platform.rb +4 -0
  5. data/lib/mspec/helpers/environment.rb +12 -22
  6. data/lib/mspec/helpers/io.rb +6 -1
  7. data/lib/mspec/helpers/mock_to_path.rb +1 -1
  8. data/lib/mspec/helpers/ruby_exe.rb +8 -3
  9. data/lib/mspec/runner/actions.rb +0 -1
  10. data/lib/mspec/utils/options.rb +0 -4
  11. data/lib/mspec/utils/script.rb +0 -1
  12. data/lib/mspec/version.rb +1 -1
  13. data/spec/commands/mkspec_spec.rb +31 -31
  14. data/spec/commands/mspec_ci_spec.rb +14 -14
  15. data/spec/commands/mspec_run_spec.rb +4 -4
  16. data/spec/commands/mspec_spec.rb +33 -56
  17. data/spec/commands/mspec_tag_spec.rb +26 -26
  18. data/spec/guards/background_spec.rb +1 -1
  19. data/spec/guards/block_device_spec.rb +1 -1
  20. data/spec/guards/bug_spec.rb +4 -4
  21. data/spec/guards/compliance_spec.rb +2 -2
  22. data/spec/guards/conflict_spec.rb +5 -5
  23. data/spec/guards/endian_spec.rb +8 -8
  24. data/spec/guards/extensions_spec.rb +1 -1
  25. data/spec/guards/feature_spec.rb +1 -1
  26. data/spec/guards/guard_spec.rb +20 -20
  27. data/spec/guards/noncompliance_spec.rb +1 -1
  28. data/spec/guards/platform_spec.rb +14 -14
  29. data/spec/guards/quarantine_spec.rb +1 -1
  30. data/spec/guards/runner_spec.rb +7 -7
  31. data/spec/guards/specified_spec.rb +7 -7
  32. data/spec/guards/superuser_spec.rb +3 -3
  33. data/spec/guards/support_spec.rb +1 -1
  34. data/spec/guards/tty_spec.rb +1 -1
  35. data/spec/guards/user_spec.rb +3 -3
  36. data/spec/guards/version_spec.rb +3 -3
  37. data/spec/helpers/ducktype_spec.rb +3 -3
  38. data/spec/helpers/environment_spec.rb +18 -10
  39. data/spec/helpers/flunk_spec.rb +2 -2
  40. data/spec/helpers/io_spec.rb +2 -2
  41. data/spec/helpers/ruby_exe_spec.rb +5 -9
  42. data/spec/matchers/have_singleton_method_spec.rb +1 -1
  43. data/spec/matchers/output_spec.rb +1 -1
  44. data/spec/mocks/mock_spec.rb +41 -41
  45. data/spec/mocks/proxy_spec.rb +1 -1
  46. data/spec/runner/actions/filter_spec.rb +1 -1
  47. data/spec/runner/actions/tag_spec.rb +17 -17
  48. data/spec/runner/actions/taglist_spec.rb +8 -8
  49. data/spec/runner/actions/tagpurge_spec.rb +11 -11
  50. data/spec/runner/actions/timer_spec.rb +4 -4
  51. data/spec/runner/context_spec.rb +32 -32
  52. data/spec/runner/example_spec.rb +1 -1
  53. data/spec/runner/filters/profile_spec.rb +2 -2
  54. data/spec/runner/filters/tag_spec.rb +6 -6
  55. data/spec/runner/formatters/describe_spec.rb +6 -6
  56. data/spec/runner/formatters/dotted_spec.rb +10 -10
  57. data/spec/runner/formatters/file_spec.rb +2 -2
  58. data/spec/runner/formatters/html_spec.rb +10 -10
  59. data/spec/runner/formatters/junit_spec.rb +11 -11
  60. data/spec/runner/formatters/method_spec.rb +3 -3
  61. data/spec/runner/formatters/specdoc_spec.rb +1 -1
  62. data/spec/runner/formatters/spinner_spec.rb +4 -4
  63. data/spec/runner/formatters/unit_spec.rb +7 -7
  64. data/spec/runner/formatters/yaml_spec.rb +10 -10
  65. data/spec/runner/mspec_spec.rb +25 -25
  66. data/spec/runner/shared_spec.rb +1 -1
  67. data/spec/utils/options_spec.rb +28 -50
  68. data/spec/utils/script_spec.rb +15 -24
  69. metadata +12 -16
  70. data/lib/mspec/runner/actions/gdb.rb +0 -17
  71. data/spec/runner/actions/gdb_spec.rb +0 -61
@@ -1,17 +0,0 @@
1
- require 'mspec/runner/actions/filter'
2
-
3
- class GdbAction < ActionFilter
4
- def before(state)
5
- Kernel.yield_gdb(true) if self === state.description
6
- end
7
-
8
- def register
9
- super
10
- MSpec.register :before, self
11
- end
12
-
13
- def unregister
14
- super
15
- MSpec.unregister :before, self
16
- end
17
- end
@@ -1,61 +0,0 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
2
- require 'mspec/runner/actions/gdb'
3
- require 'mspec/runner/mspec'
4
- require 'mspec/runner/example'
5
-
6
- describe GdbAction do
7
- before :each do
8
- MSpec.stub!(:read_tags).and_return([])
9
- end
10
-
11
- it "creates an MatchFilter with its tag and desc arguments" do
12
- filter = mock('action filter').as_null_object
13
- MatchFilter.should_receive(:new).with(nil, "some", "thing").and_return(filter)
14
- GdbAction.new ["tag", "key"], ["some", "thing"]
15
- end
16
- end
17
-
18
- describe GdbAction, "#before" do
19
- before :each do
20
- MSpec.stub!(:read_tags).and_return([])
21
- @state = ExampleState.new ContextState.new("Catch#me"), "if you can"
22
- end
23
-
24
- it "does not invoke the debugger if the description does not match" do
25
- Kernel.should_not_receive(:yield_gdb)
26
- action = GdbAction.new nil, "match"
27
- action.before @state
28
- end
29
-
30
- it "invokes the debugger if the description matches" do
31
- Kernel.should_receive(:yield_gdb).with(true)
32
- action = GdbAction.new nil, "can"
33
- action.before @state
34
- end
35
- end
36
-
37
- describe GdbAction, "#register" do
38
- before :each do
39
- MSpec.stub!(:read_tags).and_return([])
40
- MSpec.stub!(:register)
41
- @action = GdbAction.new nil, nil
42
- end
43
-
44
- it "registers itself with MSpec for the :before action" do
45
- MSpec.should_receive(:register).with(:before, @action)
46
- @action.register
47
- end
48
- end
49
-
50
- describe GdbAction, "#unregister" do
51
- before :each do
52
- MSpec.stub!(:read_tags).and_return([])
53
- MSpec.stub!(:unregister)
54
- @action = GdbAction.new nil, nil
55
- end
56
-
57
- it "unregisters itself with MSpec for the :before action" do
58
- MSpec.should_receive(:unregister).with(:before, @action)
59
- @action.unregister
60
- end
61
- end