mrspec 0.3.0 → 0.3.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3716393cd836e1e228ee410a752fa456251a14a
|
4
|
+
data.tar.gz: db2dd4b64131c69a5e515553851200758f07b7d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a337f4dff9c32fe226680d45d3168a5de4ccd22dc133d9f99c77e49d9fe14806a0634df8b0633840bb7ba3cc0d3a04b3ff99edb5663f9a9da742bf5f72b8663
|
7
|
+
data.tar.gz: bb1f71b60212884a1bebc4e591fbd2e820f79dd7285365ebccadff6f2a19c9b424a59d3f4ac389c2da8724282409f92bbb5cdfe2b9bd212d9acfacebaf199bce
|
@@ -25,7 +25,8 @@ class RSpec::Core::Parser
|
|
25
25
|
option_parser.on('-v', '--version', 'Display the version.') do
|
26
26
|
$stdout.puts "mrspec #{MRspec::VERSION}\n"\
|
27
27
|
"rspec-core #{RSpec::Core::Version::STRING}\n"\
|
28
|
-
"minitest #{Minitest::VERSION}\n"
|
28
|
+
"minitest #{Minitest::VERSION}\n"\
|
29
|
+
"wwhhiae2c #{ErrorToCommunicate::VERSION}\n"
|
29
30
|
exit
|
30
31
|
end
|
31
32
|
|
data/lib/mrspec/configuration.rb
CHANGED
@@ -6,6 +6,12 @@ module MRspec
|
|
6
6
|
class Configuration < RSpec::Core::Configuration
|
7
7
|
def initialize(*)
|
8
8
|
super
|
9
|
+
# Turn color on by default, b/c everyone I know that uses it uses colour, so make it opt-out rather than opt-in
|
10
|
+
# https://github.com/JoshCheek/mrspec/issues/12
|
11
|
+
# Defaulted here: https://github.com/rspec/rspec-core/blob/44afa9bd83e655b4d1fa60c0d73373a754aa479b/lib/rspec/core/configuration.rb#L367
|
12
|
+
# Exposed here: https://github.com/rspec/rspec-core/blob/44afa9bd83e655b4d1fa60c0d73373a754aa479b/lib/rspec/core/configuration.rb#L715-L722
|
13
|
+
@color = true
|
14
|
+
|
9
15
|
disable_monkey_patching!
|
10
16
|
filter_gems_from_backtrace 'mrspec', 'minitest', 'interception', 'what_weve_got_here_is_an_error_to_communicate'
|
11
17
|
self.pattern = pattern.sub '*_spec.rb', '{*_spec,*_test,test_*}.rb'
|
data/lib/mrspec/version.rb
CHANGED
@@ -37,3 +37,20 @@ class TestFormatterConfiguration < Minitest::Spec
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
40
|
+
|
41
|
+
class TestOtherConfiguration < Minitest::Spec
|
42
|
+
def assert_colour(is_enabled, argv)
|
43
|
+
config = MRspec::Configuration.new
|
44
|
+
RSpec::Core::ConfigurationOptions.new(argv).configure(config)
|
45
|
+
assert_equal is_enabled, config.color_enabled?
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'defaults colour to on' do
|
49
|
+
assert_colour true, []
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'respects explicit choices to set colour off/on' do
|
53
|
+
assert_colour true, ['--colour']
|
54
|
+
assert_colour false, ['--no-colour']
|
55
|
+
end
|
56
|
+
end
|
@@ -49,7 +49,7 @@ class TestParserMonkeyPatches < Minitest::Spec
|
|
49
49
|
refute_match /\brspec\b/, Parser.new([]).mrspec_parser({}).banner
|
50
50
|
end
|
51
51
|
|
52
|
-
it 'overrides -v and --version includes the Mrspec version, the RSpec::Core version, and the
|
52
|
+
it 'overrides -v and --version includes the Mrspec version, the RSpec::Core version, the Minitest version, and the ErrorToCommunicate version' do
|
53
53
|
rspec_version = record_hostile_parsing Parser.new([]).rspec_parser({}), '--version'
|
54
54
|
rspec_v = record_hostile_parsing Parser.new([]).rspec_parser({}), '-v'
|
55
55
|
mrspec_version = record_hostile_parsing Parser.new([]).mrspec_parser({}), '--version'
|
@@ -62,7 +62,8 @@ class TestParserMonkeyPatches < Minitest::Spec
|
|
62
62
|
# MRspec overrides both of these flags to print versions of all relevant libs
|
63
63
|
expected = "mrspec #{MRspec::VERSION}\n"\
|
64
64
|
"rspec-core #{RSpec::Core::Version::STRING}\n"\
|
65
|
-
"minitest #{Minitest::VERSION}\n"
|
65
|
+
"minitest #{Minitest::VERSION}\n"\
|
66
|
+
"wwhhiae2c #{ErrorToCommunicate::VERSION}\n"
|
66
67
|
assert_equal mrspec_version, mrspec_v
|
67
68
|
assert_equal expected, mrspec_version
|
68
69
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mrspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Cheek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec-core
|
@@ -118,7 +118,7 @@ files:
|
|
118
118
|
- mrspec.gemspec
|
119
119
|
- test/support/helper.rb
|
120
120
|
- test/support/mock.rb
|
121
|
-
- test/
|
121
|
+
- test/test_configuration.rb
|
122
122
|
- test/test_mrspec.rb
|
123
123
|
- test/test_parser_monkey_patches.rb
|
124
124
|
homepage: https://github.com/JoshCheek/mrspec
|
@@ -150,7 +150,7 @@ test_files:
|
|
150
150
|
- features/support/env.rb
|
151
151
|
- test/support/helper.rb
|
152
152
|
- test/support/mock.rb
|
153
|
-
- test/
|
153
|
+
- test/test_configuration.rb
|
154
154
|
- test/test_mrspec.rb
|
155
155
|
- test/test_parser_monkey_patches.rb
|
156
156
|
has_rdoc:
|