rspec_gem 0.1.1 → 0.2.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.
- data/README.md +29 -4
- data/bin/rspec_gem +8 -0
- data/lib/rspec_gem/version.rb +1 -1
- data/rspec_gem.gemspec +1 -0
- metadata +4 -2
data/README.md
CHANGED
@@ -20,6 +20,31 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
For example, you have rails application of name "rails_app" and gem of name "testing_gem" with the files for testing.
|
22
22
|
|
23
|
+
### 0.2.x
|
24
|
+
|
25
|
+
You can use path into rails environment by use method (Usage resource of application, like models)
|
26
|
+
|
27
|
+
RspecGem.path_rails_environment
|
28
|
+
|
29
|
+
which you can use in file spec_helper.rb, for example:
|
30
|
+
|
31
|
+
require "rspec_gem"
|
32
|
+
require RspecGem.path_rails_environment
|
33
|
+
|
34
|
+
Finally in your application rails_app invoke command (all tests from directory "spec" from gem testing_gem)
|
35
|
+
|
36
|
+
$ rspec_gem testing_gem spec
|
37
|
+
|
38
|
+
with color
|
39
|
+
|
40
|
+
$ rspec_gem testing_gem "spec --color"
|
41
|
+
|
42
|
+
more precision
|
43
|
+
|
44
|
+
$ rspec_gem testing_gem spec/testing_gem_spec.rb
|
45
|
+
|
46
|
+
### 0.1.x
|
47
|
+
|
23
48
|
Then you should include
|
24
49
|
|
25
50
|
require "rspec_gem"
|
@@ -27,18 +52,18 @@ Then you should include
|
|
27
52
|
|
28
53
|
into file ../testing_gem/lib/testing_gem.rb in your gem.
|
29
54
|
|
30
|
-
You can use path into rails environment
|
55
|
+
You can use path into rails environment by use method (Usage resource of application, like models)
|
31
56
|
|
32
57
|
RspecGem.path_rails_environment
|
33
58
|
|
34
59
|
Finally in your application rails_app invoke command (all tests from directory "spec" from gem testing_gem)
|
35
60
|
|
36
|
-
rake testing_gem:rspec spec
|
61
|
+
$ RAILS_ENV=test rake testing_gem:rspec spec
|
37
62
|
|
38
63
|
with color
|
39
64
|
|
40
|
-
rake testing_gem:rspec "spec --color"
|
65
|
+
$ RAILS_ENV=test rake testing_gem:rspec "spec --color"
|
41
66
|
|
42
67
|
more precision
|
43
68
|
|
44
|
-
rake testing_gem:rspec spec/testing_gem_spec.rb
|
69
|
+
$ RAILS_ENV=test rake testing_gem:rspec spec/testing_gem_spec.rb
|
data/bin/rspec_gem
ADDED
data/lib/rspec_gem/version.rb
CHANGED
data/rspec_gem.gemspec
CHANGED
@@ -15,6 +15,7 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.homepage = "https://github.com/raglub/rspec_gem"
|
16
16
|
|
17
17
|
gem.files = `git ls-files`.split($/)
|
18
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
18
19
|
gem.test_files = gem.files.grep(%r{^(spec)/})
|
19
20
|
gem.require_paths = ["lib"]
|
20
21
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec_gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -62,7 +62,8 @@ dependencies:
|
|
62
62
|
description: Invoke the tests rspec from gems in application rails.
|
63
63
|
email:
|
64
64
|
- raglub.ruby@gmail.com
|
65
|
-
executables:
|
65
|
+
executables:
|
66
|
+
- rspec_gem
|
66
67
|
extensions: []
|
67
68
|
extra_rdoc_files: []
|
68
69
|
files:
|
@@ -71,6 +72,7 @@ files:
|
|
71
72
|
- LICENSE.txt
|
72
73
|
- README.md
|
73
74
|
- Rakefile
|
75
|
+
- bin/rspec_gem
|
74
76
|
- lib/rspec_gem.rb
|
75
77
|
- lib/rspec_gem/version.rb
|
76
78
|
- lib/tasks/rspec_gem.rake
|