fantaskspec 1.0.0 → 1.1.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/README.md +10 -1
- data/lib/fantaskspec.rb +1 -1
- data/lib/fantaskspec/rake_example_group.rb +6 -0
- data/lib/fantaskspec/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 635b7d95793a401854591c23050d23784abff443
|
4
|
+
data.tar.gz: 15dc8288276dc198b63087aa87180f82ddb6b75f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7466d1203df977ae3d574c97f93f895656ed757977b36b5a5fb9b520245f20affa372f9a9834cdf09367677281bdb0fb9301991d95f92460470d8fc3e3696367
|
7
|
+
data.tar.gz: 6cd6a28b97f2d83845bd17e0d278581870dbde91293fdb2542a290818fb207914021c7aab8b387b7d27a979eea82dbb325cc358ce8afa8b88b95bbb00edc2a04
|
data/README.md
CHANGED
@@ -56,7 +56,7 @@ We can test it like this:
|
|
56
56
|
```ruby
|
57
57
|
require "spec_helper"
|
58
58
|
|
59
|
-
RSpec.describe "
|
59
|
+
RSpec.describe "namespace:taskname", type: :rake do
|
60
60
|
it { is_expected.to depend_on(:environment) }
|
61
61
|
|
62
62
|
it "executes some code" do
|
@@ -82,6 +82,15 @@ as long as the test is located at `spec/tasks` or `spec/lib/tasks`.
|
|
82
82
|
We also have access to `task_name`, which is just the Fantaskspec's best guess at the name of the task
|
83
83
|
we're specifying is, based on the description string we pass to `describe` or `context`.
|
84
84
|
|
85
|
+
`to_task_arguments`
|
86
|
+
-------------------
|
87
|
+
If your task requires arguments, just use the `to_task_arguments` helper.
|
88
|
+
|
89
|
+
```
|
90
|
+
arguments = to_task_arguments("foo", "bar")
|
91
|
+
task.execute(arguments)
|
92
|
+
```
|
93
|
+
|
85
94
|
Rake testing gotchas
|
86
95
|
--------------------
|
87
96
|
There are 2 ways to get your Rake task's code to execute: by calling either `execute` or `invoke` on the task (or subject).
|
data/lib/fantaskspec.rb
CHANGED
@@ -5,7 +5,7 @@ require "fantaskspec/version"
|
|
5
5
|
require "fantaskspec/rake_example_group"
|
6
6
|
|
7
7
|
module Fantaskspec
|
8
|
-
TASK_SPEC_PATHS = [/
|
8
|
+
TASK_SPEC_PATHS = [%r{spec/tasks}, %r{spec/lib/tasks}].freeze
|
9
9
|
|
10
10
|
def self.initialize_configuration(config)
|
11
11
|
config.include RakeExampleGroup, type: :rake
|
data/lib/fantaskspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fantaskspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Crismali
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.7'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: pry
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
154
|
version: '0'
|
141
155
|
requirements: []
|
142
156
|
rubyforge_project:
|
143
|
-
rubygems_version: 2.
|
157
|
+
rubygems_version: 2.6.11
|
144
158
|
signing_key:
|
145
159
|
specification_version: 4
|
146
160
|
summary: Makes it easy to test your Rake tasks with RSpec.
|