mrspec 0.1.1 → 0.1.2

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: 4c2fcc823e51b94b52dba0d39f0b2440519373e8
4
- data.tar.gz: 4ab34320cf0c8d6bba5726ba562276980ab711d4
3
+ metadata.gz: 5c9a8ec8e15096ad06f0d9b147e4f91091f5e5e0
4
+ data.tar.gz: 61a4ea17a6e18f6d7c3b7aee9903248f3f76c930
5
5
  SHA512:
6
- metadata.gz: f5d9fa09313eb832dcabdafb817a8778f1ba6cd416287d0fca519122cb303afad9f011d799e5bf8140590b0d41bb7b63e02dfe2ab4d2c0f8528f0bc144e071c8
7
- data.tar.gz: d8a9f3f30ef85c8e552230e91a3abd16e65848efeb9916a9a2cfb35772341d6ad4eb18c0454a1082cf4c08ad9ea342c57161b9e1c08fac7fdbd4a4241ee5d326
6
+ metadata.gz: e7df803969216c5e9a1c81f956d84e5ca280b929d4a90f8ae3da596884093a852734f5d8edfad384640fbbacdd8b34f469717dea82f26c4c0699dc86e5a00426
7
+ data.tar.gz: cd7a2ce65de8d084b6d70536e363e24f7b3b0918565f91e5b11996197e8743d429dbed449bb489254c139e5f53e427b22aa84801dbe8757e45f752c53757c4aa
data/.rspec ADDED
@@ -0,0 +1,5 @@
1
+ --colour
2
+ --fail-fast
3
+ --require error_to_communicate/at_exit
4
+ --require error_to_communicate/rspec_formatter
5
+ --format WhatWeveGotHereIsAnErrorToCommunicate::RSpecFormatter
data/Readme.md CHANGED
@@ -10,10 +10,15 @@ Also runs RSpec's tests, so if you want to use them side-by-side,
10
10
  this will do it.
11
11
 
12
12
 
13
+ Pronounciation
14
+ --------------
15
+
16
+ "Mister Spec"
17
+
18
+
13
19
  Examples
14
20
  --------
15
21
 
16
-
17
22
  ### Run specs and tests in tandem
18
23
 
19
24
  It matches `test/*_test.rb`, `test/test_*.rb`, `spec/*_spec.rb`.
@@ -181,6 +186,7 @@ Someone suggested running Minitest with the RSpec runner (see attribution sectio
181
186
  and I thought that was an interesting idea that could have value if it worked.
182
187
  ...so, here we are.
183
188
 
189
+
184
190
  Nuances
185
191
  -------
186
192
 
@@ -50,6 +50,29 @@ Feature: mrspec
50
50
  And stdout includes "0 failures"
51
51
 
52
52
 
53
+ Scenario: It works when there is only a spec dir
54
+ Given the file "spec/something_spec.rb":
55
+ """
56
+ RSpec.describe 'a' do
57
+ it('b') { }
58
+ end
59
+ """
60
+ When I run "mrspec"
61
+ Then the program ran successfully
62
+
63
+
64
+ Scenario: It works when there is only a test dir
65
+ Given the file "test/something_spec.rb":
66
+ """
67
+ class A < Minitest::Test
68
+ def test_b
69
+ end
70
+ end
71
+ """
72
+ When I run "mrspec"
73
+ Then the program ran successfully
74
+
75
+
53
76
  Scenario: Registers minitest tests as RSpec tests, recording skips, passes, errors, failures
54
77
  Given the file "some_test.rb":
55
78
  """
data/lib/mrspec/runner.rb CHANGED
@@ -6,7 +6,9 @@ module MRspec
6
6
  super
7
7
  # seems like there should be a better way, but I can't figure out what it is
8
8
  files_and_dirs = @options.options[:files_or_directories_to_run]
9
- files_and_dirs << 'spec' << 'test' if files_and_dirs.empty?
9
+ return if files_and_dirs.any?
10
+ files_and_dirs << 'spec' if File.directory? 'spec'
11
+ files_and_dirs << 'test' if File.directory? 'test'
10
12
  end
11
13
  end
12
14
  end
@@ -1,3 +1,3 @@
1
1
  module MRspec
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
data/mrspec.gemspec CHANGED
@@ -21,4 +21,5 @@ Gem::Specification.new do |s|
21
21
 
22
22
  s.add_development_dependency "haiti", ">= 0.2.2", "< 0.3"
23
23
  s.add_development_dependency "cucumber", "~> 2.0"
24
+ s.add_development_dependency "what_weve_got_here_is_an_error_to_communicate", "> 0"
24
25
  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.1.1
4
+ version: 0.1.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-05-27 00:00:00.000000000 Z
11
+ date: 2015-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-core
@@ -72,6 +72,20 @@ dependencies:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: '2.0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: what_weve_got_here_is_an_error_to_communicate
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">"
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">"
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
75
89
  description: 'Allows you to run Minitest tests and specs with RSpec''s runner, thus
76
90
  you can write both Minitest and RSpec, side-by-side, and take advantage of the many
77
91
  incredibly helpful features it supports (primarily: better formatters, --colour,
@@ -84,6 +98,7 @@ extensions: []
84
98
  extra_rdoc_files: []
85
99
  files:
86
100
  - ".gitignore"
101
+ - ".rspec"
87
102
  - ".travis.yml"
88
103
  - Gemfile
89
104
  - Readme.md