mspec 1.7.0 → 1.8.0
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 +4 -4
- data/.travis.yml +9 -7
- data/lib/mspec/commands/mspec.rb +0 -8
- data/lib/mspec/guards/platform.rb +4 -0
- data/lib/mspec/helpers/environment.rb +12 -22
- data/lib/mspec/helpers/io.rb +6 -1
- data/lib/mspec/helpers/mock_to_path.rb +1 -1
- data/lib/mspec/helpers/ruby_exe.rb +8 -3
- data/lib/mspec/runner/actions.rb +0 -1
- data/lib/mspec/utils/options.rb +0 -4
- data/lib/mspec/utils/script.rb +0 -1
- data/lib/mspec/version.rb +1 -1
- data/spec/commands/mkspec_spec.rb +31 -31
- data/spec/commands/mspec_ci_spec.rb +14 -14
- data/spec/commands/mspec_run_spec.rb +4 -4
- data/spec/commands/mspec_spec.rb +33 -56
- data/spec/commands/mspec_tag_spec.rb +26 -26
- data/spec/guards/background_spec.rb +1 -1
- data/spec/guards/block_device_spec.rb +1 -1
- data/spec/guards/bug_spec.rb +4 -4
- data/spec/guards/compliance_spec.rb +2 -2
- data/spec/guards/conflict_spec.rb +5 -5
- data/spec/guards/endian_spec.rb +8 -8
- data/spec/guards/extensions_spec.rb +1 -1
- data/spec/guards/feature_spec.rb +1 -1
- data/spec/guards/guard_spec.rb +20 -20
- data/spec/guards/noncompliance_spec.rb +1 -1
- data/spec/guards/platform_spec.rb +14 -14
- data/spec/guards/quarantine_spec.rb +1 -1
- data/spec/guards/runner_spec.rb +7 -7
- data/spec/guards/specified_spec.rb +7 -7
- data/spec/guards/superuser_spec.rb +3 -3
- data/spec/guards/support_spec.rb +1 -1
- data/spec/guards/tty_spec.rb +1 -1
- data/spec/guards/user_spec.rb +3 -3
- data/spec/guards/version_spec.rb +3 -3
- data/spec/helpers/ducktype_spec.rb +3 -3
- data/spec/helpers/environment_spec.rb +18 -10
- data/spec/helpers/flunk_spec.rb +2 -2
- data/spec/helpers/io_spec.rb +2 -2
- data/spec/helpers/ruby_exe_spec.rb +5 -9
- data/spec/matchers/have_singleton_method_spec.rb +1 -1
- data/spec/matchers/output_spec.rb +1 -1
- data/spec/mocks/mock_spec.rb +41 -41
- data/spec/mocks/proxy_spec.rb +1 -1
- data/spec/runner/actions/filter_spec.rb +1 -1
- data/spec/runner/actions/tag_spec.rb +17 -17
- data/spec/runner/actions/taglist_spec.rb +8 -8
- data/spec/runner/actions/tagpurge_spec.rb +11 -11
- data/spec/runner/actions/timer_spec.rb +4 -4
- data/spec/runner/context_spec.rb +32 -32
- data/spec/runner/example_spec.rb +1 -1
- data/spec/runner/filters/profile_spec.rb +2 -2
- data/spec/runner/filters/tag_spec.rb +6 -6
- data/spec/runner/formatters/describe_spec.rb +6 -6
- data/spec/runner/formatters/dotted_spec.rb +10 -10
- data/spec/runner/formatters/file_spec.rb +2 -2
- data/spec/runner/formatters/html_spec.rb +10 -10
- data/spec/runner/formatters/junit_spec.rb +11 -11
- data/spec/runner/formatters/method_spec.rb +3 -3
- data/spec/runner/formatters/specdoc_spec.rb +1 -1
- data/spec/runner/formatters/spinner_spec.rb +4 -4
- data/spec/runner/formatters/unit_spec.rb +7 -7
- data/spec/runner/formatters/yaml_spec.rb +10 -10
- data/spec/runner/mspec_spec.rb +25 -25
- data/spec/runner/shared_spec.rb +1 -1
- data/spec/utils/options_spec.rb +28 -50
- data/spec/utils/script_spec.rb +15 -24
- metadata +12 -16
- data/lib/mspec/runner/actions/gdb.rb +0 -17
- 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
|