maniok_bdd 0.2.1 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +28 -5
- data/lib/maniok_bdd/rspec/example_group.rb +1 -1
- data/lib/maniok_bdd/version.rb +1 -1
- metadata +37 -5
data/README.md
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
![logo](http://seekingsustenance.files.wordpress.com/2010/04/manioc-whole.jpg)
|
2
|
+
|
3
|
+
RSpec extension to run Gherkin steps
|
2
4
|
|
3
5
|
[![Gem Version](https://badge.fury.io/rb/maniok_bdd.png)](http://badge.fury.io/rb/maniok_bdd)
|
4
6
|
[![Dependency Status](https://gemnasium.com/21croissants/maniok_bdd.png)](https://gemnasium.com/21croissants/maniok_bdd)
|
@@ -10,16 +12,37 @@ BDD with POROs
|
|
10
12
|
|
11
13
|
[Hosted on relish](https://www.relishapp.com/21croissants/maniok-bdd)
|
12
14
|
|
13
|
-
#
|
15
|
+
# Example
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'spec_helper'
|
19
|
+
|
20
|
+
Feature "The Simplest Feature" do
|
14
21
|
|
15
|
-
|
22
|
+
shared_steps "home" do
|
23
|
+
Given "I am on the home page" do
|
24
|
+
visit "/"
|
25
|
+
end
|
26
|
+
end
|
16
27
|
|
17
|
-
|
28
|
+
Scenario "The Simplest Scenario" do
|
29
|
+
include_steps "home"
|
18
30
|
|
19
|
-
|
31
|
+
When "something happens" do
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
Then "it should assert correctly" do
|
36
|
+
true.should be_true
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
```
|
20
41
|
|
21
42
|
# Author
|
22
43
|
|
23
44
|
[Jean-Michel Garnier](http://21croissants.com)<br/>
|
24
45
|
|
46
|
+
Heavily inspired by http://coulda.tiggerpalace.com/ & [Railsware rspec-example_steps](https://github.com/railsware/rspec-example_steps)
|
47
|
+
|
25
48
|
License: MIT<br/>
|
@@ -4,7 +4,7 @@ module ManiokBdd
|
|
4
4
|
module ExampleGroup
|
5
5
|
def include_steps(*args)
|
6
6
|
name = args.shift
|
7
|
-
shared_block = RSpec.world.shared_example_steps[name]
|
7
|
+
shared_block = ::RSpec.world.shared_example_steps[name]
|
8
8
|
shared_block or raise ArgumentError, "Could not find shared steps #{name.inspect}"
|
9
9
|
instance_eval_with_args(*args, &shared_block)
|
10
10
|
end
|
data/lib/maniok_bdd/version.rb
CHANGED
metadata
CHANGED
@@ -2,15 +2,47 @@
|
|
2
2
|
name: maniok_bdd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.2.
|
5
|
+
version: 0.2.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jean-Michel Garnier
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
13
|
-
dependencies:
|
12
|
+
date: 2013-05-14 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rspec
|
16
|
+
type: :runtime
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '2.0'
|
22
|
+
none: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ~>
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '2.0'
|
28
|
+
none: false
|
29
|
+
prerelease: false
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: gherkin
|
32
|
+
type: :runtime
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '2.5'
|
38
|
+
none: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '2.5'
|
44
|
+
none: false
|
45
|
+
prerelease: false
|
14
46
|
description:
|
15
47
|
email: jean-michel@21croissants.com
|
16
48
|
executables: []
|
@@ -42,7 +74,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
42
74
|
- !ruby/object:Gem::Version
|
43
75
|
segments:
|
44
76
|
- 0
|
45
|
-
hash:
|
77
|
+
hash: 477115614955982302
|
46
78
|
version: '0'
|
47
79
|
none: false
|
48
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
@@ -51,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
51
83
|
- !ruby/object:Gem::Version
|
52
84
|
segments:
|
53
85
|
- 0
|
54
|
-
hash:
|
86
|
+
hash: 477115614955982302
|
55
87
|
version: '0'
|
56
88
|
none: false
|
57
89
|
requirements: []
|