rspec_in_context 0.1.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 +7 -0
- data/.gitignore +10 -0
- data/.rspec +1 -0
- data/.rubocop-http---relaxed-ruby-style-rubocop-yml +166 -0
- data/.rubocop.yml +17 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +8 -0
- data/Guardfile +52 -0
- data/README.md +174 -0
- data/Rakefile +4 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/rspec_in_context.rb +17 -0
- data/lib/rspec_in_context/in_context.rb +42 -0
- data/lib/rspec_in_context/version.rb +5 -0
- data/rspec_in_context.gemspec +38 -0
- metadata +200 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: dccade70caa948b401dbafb0ff2d0d4a63aab1a3
|
4
|
+
data.tar.gz: 51bc8d283dcca7fd3922422993177e0afc8e65b0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d8333b33ec18c2a213b3a62a3c01163012e3e8e5fe7f4e3a361434298e03d93ab14c25276f7d20ef8cc1024c50932e17dc5300a1fe8fa73a997976a2eee9a51e
|
7
|
+
data.tar.gz: 4313b7c1f21da79e15f8678218b6ef6ffd49ce255fc974a910f8ff36f1235dd3aecc28f5d425da501cfc42632766f387526a145439f94b64475a16af4d2433b1
|
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
@@ -0,0 +1,166 @@
|
|
1
|
+
# Relaxed.Ruby.Style
|
2
|
+
## Version 2.2
|
3
|
+
|
4
|
+
Style/Alias:
|
5
|
+
Enabled: false
|
6
|
+
StyleGuide: https://relaxed.ruby.style/#stylealias
|
7
|
+
|
8
|
+
Style/AsciiComments:
|
9
|
+
Enabled: false
|
10
|
+
StyleGuide: https://relaxed.ruby.style/#styleasciicomments
|
11
|
+
|
12
|
+
Style/BeginBlock:
|
13
|
+
Enabled: false
|
14
|
+
StyleGuide: https://relaxed.ruby.style/#stylebeginblock
|
15
|
+
|
16
|
+
Style/BlockDelimiters:
|
17
|
+
Enabled: false
|
18
|
+
StyleGuide: https://relaxed.ruby.style/#styleblockdelimiters
|
19
|
+
|
20
|
+
Style/CommentAnnotation:
|
21
|
+
Enabled: false
|
22
|
+
StyleGuide: https://relaxed.ruby.style/#stylecommentannotation
|
23
|
+
|
24
|
+
Style/Documentation:
|
25
|
+
Enabled: false
|
26
|
+
StyleGuide: https://relaxed.ruby.style/#styledocumentation
|
27
|
+
|
28
|
+
Layout/DotPosition:
|
29
|
+
Enabled: false
|
30
|
+
StyleGuide: https://relaxed.ruby.style/#layoutdotposition
|
31
|
+
|
32
|
+
Style/DoubleNegation:
|
33
|
+
Enabled: false
|
34
|
+
StyleGuide: https://relaxed.ruby.style/#styledoublenegation
|
35
|
+
|
36
|
+
Style/EndBlock:
|
37
|
+
Enabled: false
|
38
|
+
StyleGuide: https://relaxed.ruby.style/#styleendblock
|
39
|
+
|
40
|
+
Style/FormatString:
|
41
|
+
Enabled: false
|
42
|
+
StyleGuide: https://relaxed.ruby.style/#styleformatstring
|
43
|
+
|
44
|
+
Style/IfUnlessModifier:
|
45
|
+
Enabled: false
|
46
|
+
StyleGuide: https://relaxed.ruby.style/#styleifunlessmodifier
|
47
|
+
|
48
|
+
Style/Lambda:
|
49
|
+
Enabled: false
|
50
|
+
StyleGuide: https://relaxed.ruby.style/#stylelambda
|
51
|
+
|
52
|
+
Style/ModuleFunction:
|
53
|
+
Enabled: false
|
54
|
+
StyleGuide: https://relaxed.ruby.style/#stylemodulefunction
|
55
|
+
|
56
|
+
Style/MultilineBlockChain:
|
57
|
+
Enabled: false
|
58
|
+
StyleGuide: https://relaxed.ruby.style/#stylemultilineblockchain
|
59
|
+
|
60
|
+
Style/NegatedIf:
|
61
|
+
Enabled: false
|
62
|
+
StyleGuide: https://relaxed.ruby.style/#stylenegatedif
|
63
|
+
|
64
|
+
Style/NegatedWhile:
|
65
|
+
Enabled: false
|
66
|
+
StyleGuide: https://relaxed.ruby.style/#stylenegatedwhile
|
67
|
+
|
68
|
+
Style/ParallelAssignment:
|
69
|
+
Enabled: false
|
70
|
+
StyleGuide: https://relaxed.ruby.style/#styleparallelassignment
|
71
|
+
|
72
|
+
Style/PercentLiteralDelimiters:
|
73
|
+
Enabled: false
|
74
|
+
StyleGuide: https://relaxed.ruby.style/#stylepercentliteraldelimiters
|
75
|
+
|
76
|
+
Style/PerlBackrefs:
|
77
|
+
Enabled: false
|
78
|
+
StyleGuide: https://relaxed.ruby.style/#styleperlbackrefs
|
79
|
+
|
80
|
+
Style/Semicolon:
|
81
|
+
Enabled: false
|
82
|
+
StyleGuide: https://relaxed.ruby.style/#stylesemicolon
|
83
|
+
|
84
|
+
Style/SignalException:
|
85
|
+
Enabled: false
|
86
|
+
StyleGuide: https://relaxed.ruby.style/#stylesignalexception
|
87
|
+
|
88
|
+
Style/SingleLineBlockParams:
|
89
|
+
Enabled: false
|
90
|
+
StyleGuide: https://relaxed.ruby.style/#stylesinglelineblockparams
|
91
|
+
|
92
|
+
Style/SingleLineMethods:
|
93
|
+
Enabled: false
|
94
|
+
StyleGuide: https://relaxed.ruby.style/#stylesinglelinemethods
|
95
|
+
|
96
|
+
Layout/SpaceBeforeBlockBraces:
|
97
|
+
Enabled: false
|
98
|
+
StyleGuide: https://relaxed.ruby.style/#layoutspacebeforeblockbraces
|
99
|
+
|
100
|
+
Layout/SpaceInsideParens:
|
101
|
+
Enabled: false
|
102
|
+
StyleGuide: https://relaxed.ruby.style/#layoutspaceinsideparens
|
103
|
+
|
104
|
+
Style/SpecialGlobalVars:
|
105
|
+
Enabled: false
|
106
|
+
StyleGuide: https://relaxed.ruby.style/#stylespecialglobalvars
|
107
|
+
|
108
|
+
Style/StringLiterals:
|
109
|
+
Enabled: false
|
110
|
+
StyleGuide: https://relaxed.ruby.style/#stylestringliterals
|
111
|
+
|
112
|
+
Style/TrailingCommaInArguments:
|
113
|
+
Enabled: false
|
114
|
+
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainarguments
|
115
|
+
|
116
|
+
Style/TrailingCommaInArrayLiteral:
|
117
|
+
Enabled: false
|
118
|
+
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainarrayliteral
|
119
|
+
|
120
|
+
Style/TrailingCommaInHashLiteral:
|
121
|
+
Enabled: false
|
122
|
+
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainhashliteral
|
123
|
+
|
124
|
+
Style/WhileUntilModifier:
|
125
|
+
Enabled: false
|
126
|
+
StyleGuide: https://relaxed.ruby.style/#stylewhileuntilmodifier
|
127
|
+
|
128
|
+
Style/WordArray:
|
129
|
+
Enabled: false
|
130
|
+
StyleGuide: https://relaxed.ruby.style/#stylewordarray
|
131
|
+
|
132
|
+
Lint/AmbiguousRegexpLiteral:
|
133
|
+
Enabled: false
|
134
|
+
StyleGuide: https://relaxed.ruby.style/#lintambiguousregexpliteral
|
135
|
+
|
136
|
+
Lint/AssignmentInCondition:
|
137
|
+
Enabled: false
|
138
|
+
StyleGuide: https://relaxed.ruby.style/#lintassignmentincondition
|
139
|
+
|
140
|
+
Metrics/AbcSize:
|
141
|
+
Enabled: false
|
142
|
+
|
143
|
+
Metrics/BlockNesting:
|
144
|
+
Enabled: false
|
145
|
+
|
146
|
+
Metrics/ClassLength:
|
147
|
+
Enabled: false
|
148
|
+
|
149
|
+
Metrics/ModuleLength:
|
150
|
+
Enabled: false
|
151
|
+
|
152
|
+
Metrics/CyclomaticComplexity:
|
153
|
+
Enabled: false
|
154
|
+
|
155
|
+
Metrics/LineLength:
|
156
|
+
Enabled: false
|
157
|
+
|
158
|
+
Metrics/MethodLength:
|
159
|
+
Enabled: false
|
160
|
+
|
161
|
+
Metrics/ParameterLists:
|
162
|
+
Enabled: false
|
163
|
+
|
164
|
+
Metrics/PerceivedComplexity:
|
165
|
+
Enabled: false
|
166
|
+
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
inherit_from:
|
2
|
+
- http://relaxed.ruby.style/rubocop.yml
|
3
|
+
|
4
|
+
AllCops:
|
5
|
+
DisplayStyleGuide: true
|
6
|
+
DisplayCopNames: true
|
7
|
+
Exclude:
|
8
|
+
- 'db/schema.rb'
|
9
|
+
- 'vendor/**/*'
|
10
|
+
- 'config/environments/*.rb'
|
11
|
+
- 'bin/*'
|
12
|
+
|
13
|
+
Metrics/BlockLength:
|
14
|
+
Exclude:
|
15
|
+
- 'spec/**/*.rb'
|
16
|
+
- 'Guardfile'
|
17
|
+
- 'vendor/bundle'
|
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rspec_in_context
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.3.7
|
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# A sample Guardfile
|
4
|
+
# More info at https://github.com/guard/guard#readme
|
5
|
+
|
6
|
+
## Uncomment and set this to only include directories you want to watch
|
7
|
+
# directories %w(app lib config test spec features) \
|
8
|
+
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
|
9
|
+
|
10
|
+
## Note: if you are using the `directories` clause above and you are not
|
11
|
+
## watching the project directory ('.'), then you will want to move
|
12
|
+
## the Guardfile to a watched dir and symlink it back, e.g.
|
13
|
+
#
|
14
|
+
# $ mkdir config
|
15
|
+
# $ mv Guardfile config/
|
16
|
+
# $ ln -s config/Guardfile .
|
17
|
+
#
|
18
|
+
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
19
|
+
|
20
|
+
# Note: The cmd option is now required due to the increasing number of ways
|
21
|
+
# rspec may be run, below are examples of the most common uses.
|
22
|
+
# * bundler: 'bundle exec rspec'
|
23
|
+
# * bundler binstubs: 'bin/rspec'
|
24
|
+
# * spring: 'bin/rspec' (This will use spring if running and you have
|
25
|
+
# installed the spring binstubs per the docs)
|
26
|
+
# * zeus: 'zeus rspec' (requires the server to be started separately)
|
27
|
+
# * 'just' rspec: 'rspec'
|
28
|
+
|
29
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
30
|
+
require "guard/rspec/dsl"
|
31
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
32
|
+
|
33
|
+
# Feel free to open issues for suggestions and improvements
|
34
|
+
|
35
|
+
# RSpec files
|
36
|
+
rspec = dsl.rspec
|
37
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
38
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
39
|
+
watch(rspec.spec_files)
|
40
|
+
|
41
|
+
# map lib files to corresponding file
|
42
|
+
watch(%r{lib/(.*)/([^/]*).rb}) { |m| rspec.spec.call("#{m[1]}/#{m[2]}") }
|
43
|
+
|
44
|
+
# Ruby files
|
45
|
+
ruby = dsl.ruby
|
46
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
47
|
+
end
|
48
|
+
|
49
|
+
guard :rubocop do
|
50
|
+
watch(/.+\.rb$/)
|
51
|
+
watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) }
|
52
|
+
end
|
data/README.md
ADDED
@@ -0,0 +1,174 @@
|
|
1
|
+
# RspecInContext
|
2
|
+
|
3
|
+
This gem is here to help you write better shared_examples in Rspec.
|
4
|
+
|
5
|
+
Ever been bothered by the fact that they don't really behave like methods and that you can't pass it a block ? There you go: `rspec_in_context`
|
6
|
+
|
7
|
+
**NOTE**: This is an alpha version. For now context are globally scoped.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem 'rspec_in_context'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install rspec_in_context
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
### Add this into Rspec
|
28
|
+
|
29
|
+
You must require the gem on top of your spec_helper:
|
30
|
+
```ruby
|
31
|
+
require 'rspec_in_context'
|
32
|
+
```
|
33
|
+
|
34
|
+
Then include it into Rspec:
|
35
|
+
```ruby
|
36
|
+
RSpec.configure do |config|
|
37
|
+
[...]
|
38
|
+
|
39
|
+
config.include RspecInContext
|
40
|
+
end
|
41
|
+
```
|
42
|
+
|
43
|
+
### Define a new in_context
|
44
|
+
|
45
|
+
You can define in_context block that are reusable almost anywhere.
|
46
|
+
They completely look like normal Rspec.
|
47
|
+
|
48
|
+
##### Inside a Rspec block
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
# A in_context can be named with a symbol or a string
|
52
|
+
define_context :context_name do
|
53
|
+
it 'works' do
|
54
|
+
expect(true).to be_truthy
|
55
|
+
end
|
56
|
+
end
|
57
|
+
```
|
58
|
+
|
59
|
+
##### Outside a Rspec block
|
60
|
+
|
61
|
+
Outside of a test you have to use `Rspec.define_context`.
|
62
|
+
|
63
|
+
|
64
|
+
### Use the context
|
65
|
+
|
66
|
+
Anywhere in your test description, use a `in_context` block to use a predefined in_context. **They don't need to be in the same file.** Example:
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
# A in_context can be named with a symbol or a string
|
70
|
+
define_context :context_name do
|
71
|
+
it 'works' do
|
72
|
+
expect(true).to be_truthy
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
[...]
|
77
|
+
Rspec.describe MyClass do
|
78
|
+
in_context :context_name # => will execute the 'it works' test here
|
79
|
+
end
|
80
|
+
```
|
81
|
+
|
82
|
+
### Things to know
|
83
|
+
|
84
|
+
* You can chose exactly where your inside test will be used:
|
85
|
+
By using `execute_tests` in your define context, the test passed when you *use* the context will be executed here
|
86
|
+
|
87
|
+
```ruby
|
88
|
+
define_context :context_name do
|
89
|
+
it 'works' do
|
90
|
+
expect(true).to be_truthy
|
91
|
+
end
|
92
|
+
context "in this context pomme exists" do
|
93
|
+
let(:pomme) { "abcd" }
|
94
|
+
|
95
|
+
execute_tests
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
[...]
|
100
|
+
|
101
|
+
in_context :context_name do
|
102
|
+
it 'will be executed at execute_tests place' do
|
103
|
+
expect(pomme).to eq("abcd") # => true
|
104
|
+
end
|
105
|
+
end
|
106
|
+
```
|
107
|
+
|
108
|
+
* You can use variable in the in_context definition
|
109
|
+
|
110
|
+
```ruby
|
111
|
+
define_context :context_name do |name|
|
112
|
+
it 'works' do
|
113
|
+
expect(true).to be_truthy
|
114
|
+
end
|
115
|
+
context "in this context #{name} exists" do
|
116
|
+
let(name) { "abcd" }
|
117
|
+
|
118
|
+
execute_tests
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
[...]
|
123
|
+
|
124
|
+
in_context :context_name, :poire do
|
125
|
+
it 'the right variable will exists' do
|
126
|
+
expect(poire).to eq("abcd") # => true
|
127
|
+
end
|
128
|
+
end
|
129
|
+
```
|
130
|
+
|
131
|
+
* In_contexts can be scope inside one another
|
132
|
+
|
133
|
+
```ruby
|
134
|
+
define_context :context_name do |name|
|
135
|
+
it 'works' do
|
136
|
+
expect(true).to be_truthy
|
137
|
+
end
|
138
|
+
context "in this context #{name} exists" do
|
139
|
+
let(name) { "abcd" }
|
140
|
+
|
141
|
+
execute_tests
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
define_context "second in_context" do
|
146
|
+
context 'and tree also' do
|
147
|
+
let(:tree) { 'abcd' }
|
148
|
+
|
149
|
+
it 'will scope correctly' do
|
150
|
+
expect(tree).to eq(poire)
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
[...]
|
156
|
+
|
157
|
+
in_context :context_name, :poire do
|
158
|
+
it 'the right variable will exists' do
|
159
|
+
expect(poire).to eq("abcd") # => true
|
160
|
+
end
|
161
|
+
|
162
|
+
in_context "second in_context" # => will work
|
163
|
+
end
|
164
|
+
```
|
165
|
+
|
166
|
+
## Development
|
167
|
+
|
168
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
169
|
+
|
170
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
171
|
+
|
172
|
+
## Contributing
|
173
|
+
|
174
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/denispasin/rspec_in_context.
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "rspec_in_context"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'active_support/all'
|
4
|
+
require "rspec_in_context/version"
|
5
|
+
require "rspec_in_context/in_context"
|
6
|
+
|
7
|
+
module RspecInContext
|
8
|
+
def self.included(base)
|
9
|
+
base.include(RspecInContext::InContext)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
module RSpec
|
14
|
+
def self.define_context(name, &block)
|
15
|
+
RspecInContext::InContext.define_context(name, &block)
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RspecInContext
|
4
|
+
module InContext
|
5
|
+
class << self
|
6
|
+
def included(base)
|
7
|
+
base.extend ClassMethods
|
8
|
+
end
|
9
|
+
|
10
|
+
def contexts
|
11
|
+
@contexts ||= ActiveSupport::HashWithIndifferentAccess.new
|
12
|
+
end
|
13
|
+
|
14
|
+
def add_context(context_name, &block)
|
15
|
+
contexts[context_name] = block
|
16
|
+
end
|
17
|
+
|
18
|
+
def find_context(context_name)
|
19
|
+
contexts[context_name] || raise("No context found with name #{context_name}")
|
20
|
+
end
|
21
|
+
|
22
|
+
def define_context(context_name, &block)
|
23
|
+
InContext.add_context(context_name, &block)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
module ClassMethods
|
28
|
+
def in_context(context_name, *args, &block)
|
29
|
+
Thread.current[:test_block] = block
|
30
|
+
instance_exec(*args, &InContext.find_context(context_name))
|
31
|
+
end
|
32
|
+
|
33
|
+
def execute_tests
|
34
|
+
instance_exec(&Thread.current[:test_block]) if Thread.current[:test_block]
|
35
|
+
end
|
36
|
+
|
37
|
+
def define_context(context_name, &block)
|
38
|
+
InContext.add_context(context_name, &block)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require "rspec_in_context/version"
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = "rspec_in_context"
|
9
|
+
spec.version = RspecInContext::VERSION
|
10
|
+
spec.authors = ["Denis <Zaratan> Pasin"]
|
11
|
+
spec.email = ["denis@pasin.fr"]
|
12
|
+
|
13
|
+
spec.summary = 'This gem is here to help DRYing your tests cases by giving a better "shared_examples".'
|
14
|
+
spec.homepage = "https://github.com/denispasin/rspec_in_context"
|
15
|
+
|
16
|
+
# Specify which files should be added to the gem when it is released.
|
17
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
18
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
19
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
+
end
|
21
|
+
spec.bindir = "exe"
|
22
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
spec.required_ruby_version = '>= 2.3.7'
|
25
|
+
spec.license = 'MIT'
|
26
|
+
|
27
|
+
spec.add_dependency "activesupport", "> 2.0"
|
28
|
+
spec.add_dependency "rspec", "> 3.0"
|
29
|
+
|
30
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
31
|
+
spec.add_development_dependency "faker", "> 1.8"
|
32
|
+
spec.add_development_dependency "guard-rspec", "> 4.7"
|
33
|
+
spec.add_development_dependency "guard-rubocop", "~> 1.3"
|
34
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
35
|
+
spec.add_development_dependency "rspec_junit_formatter", "~> 0.4.1"
|
36
|
+
spec.add_development_dependency "rubocop", "> 0.58"
|
37
|
+
spec.add_development_dependency "simplecov", "> 0.16"
|
38
|
+
end
|
metadata
ADDED
@@ -0,0 +1,200 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rspec_in_context
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Denis <Zaratan> Pasin
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-08-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.16'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.16'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: faker
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.8'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.8'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: guard-rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '4.7'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '4.7'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: guard-rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.3'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.3'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '10.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '10.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec_junit_formatter
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.4.1
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.4.1
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0.58'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0.58'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: simplecov
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.16'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.16'
|
153
|
+
description:
|
154
|
+
email:
|
155
|
+
- denis@pasin.fr
|
156
|
+
executables: []
|
157
|
+
extensions: []
|
158
|
+
extra_rdoc_files: []
|
159
|
+
files:
|
160
|
+
- ".gitignore"
|
161
|
+
- ".rspec"
|
162
|
+
- ".rubocop-http---relaxed-ruby-style-rubocop-yml"
|
163
|
+
- ".rubocop.yml"
|
164
|
+
- ".ruby-gemset"
|
165
|
+
- ".ruby-version"
|
166
|
+
- Gemfile
|
167
|
+
- Guardfile
|
168
|
+
- README.md
|
169
|
+
- Rakefile
|
170
|
+
- bin/console
|
171
|
+
- bin/setup
|
172
|
+
- lib/rspec_in_context.rb
|
173
|
+
- lib/rspec_in_context/in_context.rb
|
174
|
+
- lib/rspec_in_context/version.rb
|
175
|
+
- rspec_in_context.gemspec
|
176
|
+
homepage: https://github.com/denispasin/rspec_in_context
|
177
|
+
licenses:
|
178
|
+
- MIT
|
179
|
+
metadata: {}
|
180
|
+
post_install_message:
|
181
|
+
rdoc_options: []
|
182
|
+
require_paths:
|
183
|
+
- lib
|
184
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
185
|
+
requirements:
|
186
|
+
- - ">="
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: 2.3.7
|
189
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - ">="
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '0'
|
194
|
+
requirements: []
|
195
|
+
rubyforge_project:
|
196
|
+
rubygems_version: 2.6.14
|
197
|
+
signing_key:
|
198
|
+
specification_version: 4
|
199
|
+
summary: This gem is here to help DRYing your tests cases by giving a better "shared_examples".
|
200
|
+
test_files: []
|