mrspec 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9041c16cd39c85c8ff58c54cb495251a2aca5d8c
4
- data.tar.gz: 52a35610db9be3f362f2a48492b9a7a6a2b60647
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ Nzc2MWQ3OGJkYjdlMTllYTc0ZjU3MTAwN2Y2OWEwNjM5Y2EzYTg1Mw==
5
+ data.tar.gz: !binary |-
6
+ YmZhZWIxMWViMzJiODI5NGY2Y2NjM2NjMmFiOTRlYjc4YzI3Mzk5NA==
5
7
  SHA512:
6
- metadata.gz: 2a72d5476814dade7b3914a020deb3c86a9dfd2153f4b8833cc77fd96b4a17b198f65b53402db06706d1cb45a311689a686445d9008fcbf0001e20663c265351
7
- data.tar.gz: 19b90025d593c80fca1a1be75ff1ac36592ad7f1fe70af8453e80cab3e296c72e5b9a36449ceec99c12c0a876de06ffa282a4124cbd36b08e3dce8431de8fbd5
8
+ metadata.gz: !binary |-
9
+ ODRiZmI4MGY4MTQwY2FiZDNhZGE3NWFlMTBkMmU1ZmY1NTBhOWRiODg1NDk3
10
+ ODNmY2MyMzBiMmRhZThkNjRlMWRlNjNmZWI2Yjg3MzUxYjllNTdiMzcyZDFk
11
+ MDRhMDgzZjdkNjA0NDNjZjljMWRiYTU5MTRiODQ3NDg4ODA1MGI=
12
+ data.tar.gz: !binary |-
13
+ ZDBkMWI0MTMyNWRkYjFhODI5ZjY3YzkwOTNkNzk0ODlkMDk3ZTE3YTk0NTI3
14
+ MmY4ZTNlYTFmMmFlODg5NzcxN2I4ZGYwZWMwNWY0NzZmZTAxNDJhMDViNGMx
15
+ MDY3M2JiZDYyYTkxYjJjYzNhZmFkNDVkYzUyZDBiOGU4MGQ1NzE=
data/.travis.yml CHANGED
@@ -1,6 +1,7 @@
1
1
  language: ruby
2
2
  script: bin/mrspec --colour --format documentation && cucumber
3
3
  rvm:
4
+ - 1.9.3
4
5
  - 2.0.0
5
6
  - 2.1.2
6
7
  - 2.2.2
@@ -10,6 +10,7 @@ class RSpec::Core::Parser
10
10
 
11
11
  # Save RSpec's parser
12
12
  alias rspec_parser parser
13
+ public :rspec_parser
13
14
 
14
15
  # Ours calls RSpec's, then modifies values on the returned parser
15
16
  def mrspec_parser(*args, &b)
@@ -10,6 +10,14 @@ module MRspec
10
10
  filter_gems_from_backtrace 'mrspec', 'minitest'
11
11
  self.pattern = pattern.sub '*_spec.rb', '{*_spec,*_test,test_*}.rb'
12
12
  self.default_formatter = WhatWeveGotHereIsAnErrorToCommunicate::RSpecFormatter
13
+
14
+ [Module, TOPLEVEL_BINDING.eval('self').singleton_class].each do |klass|
15
+ klass.class_eval do
16
+ def describe(*args, &block)
17
+ Kernel.instance_method(:describe).bind(self).call(*args, &block)
18
+ end
19
+ end
20
+ end
13
21
  end
14
22
 
15
23
  def load_spec_files(*)
@@ -1,3 +1,3 @@
1
1
  module MRspec
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
data/mrspec.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
 
19
19
  s.add_dependency "rspec-core", "~> 3.0"
20
20
  s.add_dependency "minitest", "~> 5.0"
21
- s.add_dependency "what_weve_got_here_is_an_error_to_communicate", "~> 0.0.4"
21
+ s.add_dependency "what_weve_got_here_is_an_error_to_communicate", "~> 0.0.6"
22
22
 
23
23
  s.add_development_dependency "haiti", ">= 0.2.2", "< 0.3"
24
24
  s.add_development_dependency "cucumber", "~> 2.0"
@@ -40,20 +40,20 @@ class TestParserMonkeyPatches < Minitest::Spec
40
40
  it 'returns the original #rspec_parser' do
41
41
  # just showing that it does RSpec parsery things
42
42
  options = {}
43
- Parser.new.mrspec_parser(options).parse(['-I', 'somepath'])
43
+ Parser.new([]).mrspec_parser(options).parse(['-I', 'somepath'])
44
44
  assert_equal options[:libs], ['somepath']
45
45
  end
46
46
 
47
47
  it 'modifies the description to replace uses of rspec with uses of mrpspec' do
48
- assert_match /\bmrspec\b/, Parser.new.mrspec_parser({}).banner
49
- refute_match /\brspec\b/, Parser.new.mrspec_parser({}).banner
48
+ assert_match /\bmrspec\b/, Parser.new([]).mrspec_parser({}).banner
49
+ refute_match /\brspec\b/, Parser.new([]).mrspec_parser({}).banner
50
50
  end
51
51
 
52
52
  it 'overrides -v and --version includes the Mrspec version, the RSpec::Core version, and the Minitest version' do
53
- rspec_version = record_hostile_parsing Parser.new.rspec_parser({}), '--version'
54
- rspec_v = record_hostile_parsing Parser.new.rspec_parser({}), '-v'
55
- mrspec_version = record_hostile_parsing Parser.new.mrspec_parser({}), '--version'
56
- mrspec_v = record_hostile_parsing Parser.new.mrspec_parser({}), '-v'
53
+ rspec_version = record_hostile_parsing Parser.new([]).rspec_parser({}), '--version'
54
+ rspec_v = record_hostile_parsing Parser.new([]).rspec_parser({}), '-v'
55
+ mrspec_version = record_hostile_parsing Parser.new([]).mrspec_parser({}), '--version'
56
+ mrspec_v = record_hostile_parsing Parser.new([]).mrspec_parser({}), '-v'
57
57
 
58
58
  # RSpec version parser defines both of these flags to return its version
59
59
  assert_equal rspec_version, rspec_v
@@ -72,7 +72,7 @@ class TestParserMonkeyPatches < Minitest::Spec
72
72
  it 'sets the correct description for the versions'
73
73
 
74
74
  it 'includes the what_weve_got_here_is_an_error_to_communicate formatter in the help screen' do
75
- parser = Parser.new.mrspec_parser({})
75
+ parser = Parser.new([]).mrspec_parser({})
76
76
  help = record_hostile_parsing parser, '--help'
77
77
  formatters = help.lines
78
78
  .drop_while { |l| l !~ /--format/ }
@@ -103,9 +103,9 @@ class TestParserMonkeyPatches < Minitest::Spec
103
103
  it 'redefines #parser to use the parser in .parser_method' do
104
104
  # have to do it a bit roundabout, b/c OptionParser does not override #==, so it uses object equality
105
105
  Parser.parser_method = rspec_parser
106
- assert_match /\brspec\b/, Parser.new.parser({}).banner
106
+ assert_match /\brspec\b/, Parser.new([]).parser({}).banner
107
107
 
108
108
  Parser.parser_method = mrspec_parser
109
- assert_match /\bmrspec\b/, Parser.new.parser({}).banner
109
+ assert_match /\bmrspec\b/, Parser.new([]).parser({}).banner
110
110
  end
111
111
  end
metadata CHANGED
@@ -1,92 +1,92 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mrspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Cheek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-04 00:00:00.000000000 Z
11
+ date: 2015-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '5.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '5.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: what_weve_got_here_is_an_error_to_communicate
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
- version: 0.0.4
47
+ version: 0.0.6
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: 0.0.4
54
+ version: 0.0.6
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: haiti
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: 0.2.2
62
- - - "<"
62
+ - - <
63
63
  - !ruby/object:Gem::Version
64
64
  version: '0.3'
65
65
  type: :development
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - ">="
69
+ - - ! '>='
70
70
  - !ruby/object:Gem::Version
71
71
  version: 0.2.2
72
- - - "<"
72
+ - - <
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0.3'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: cucumber
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - "~>"
79
+ - - ~>
80
80
  - !ruby/object:Gem::Version
81
81
  version: '2.0'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - "~>"
86
+ - - ~>
87
87
  - !ruby/object:Gem::Version
88
88
  version: '2.0'
89
- description: 'Allows you to run Minitest tests and specs with RSpec''s runner, thus
89
+ description: ! 'Allows you to run Minitest tests and specs with RSpec''s runner, thus
90
90
  you can write both Minitest and RSpec, side-by-side, and take advantage of the many
91
91
  incredibly helpful features it supports (primarily: better formatters, --colour,
92
92
  --fail-fast, and tagging).'
@@ -97,9 +97,9 @@ executables:
97
97
  extensions: []
98
98
  extra_rdoc_files: []
99
99
  files:
100
- - ".gitignore"
101
- - ".rspec"
102
- - ".travis.yml"
100
+ - .gitignore
101
+ - .rspec
102
+ - .travis.yml
103
103
  - Gemfile
104
104
  - Readme.md
105
105
  - bin/mrspec
@@ -130,12 +130,12 @@ require_paths:
130
130
  - lib
131
131
  required_ruby_version: !ruby/object:Gem::Requirement
132
132
  requirements:
133
- - - ">="
133
+ - - ! '>='
134
134
  - !ruby/object:Gem::Version
135
135
  version: '0'
136
136
  required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  requirements:
138
- - - ">="
138
+ - - ! '>='
139
139
  - !ruby/object:Gem::Version
140
140
  version: '0'
141
141
  requirements: []