mortadella 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/features/basic_usage.feature +5 -5
- data/features/drying_up_fields.feature +8 -8
- data/features/emptiness.feature +18 -0
- data/features/step_definitions/steps.rb +7 -1
- data/lib/mortadella.rb +4 -0
- data/mortadella.gemspec +5 -5
- metadata +12 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c495234b6faf9e2eb68ecdf2591ad4aedab027a
|
4
|
+
data.tar.gz: 6b6a4cc0a64fdf64d25b8b7ec67ef8fc31bb51cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57d672e67dcc2e90d82364fd5446d368b442f144431f7a7c7a580a7feceebd923fb57b27b6b94f6d81d6ccb397714a829ff85047229fdf6f4813c2ebb9532e0a
|
7
|
+
data.tar.gz: f72362084e467be2eced35f91cf89b9f1145de8024109e9aa6dbddae83f30fb137174ae9533e2dc1c3e4308ed0c77fa8dafdd927d65bafd6986ab855ca6a0128
|
@@ -6,11 +6,11 @@ Feature: Creating mock data tables
|
|
6
6
|
|
7
7
|
|
8
8
|
Scenario: Creating a simple data table
|
9
|
-
Given I create a Mortadella instance:
|
10
|
-
And I add a data row:
|
11
|
-
And I add another data row:
|
12
|
-
And I add another data row:
|
13
|
-
When I request the data table
|
9
|
+
Given I create a Mortadella instance: "m = Mortadella.new headers: ['DAY', 'ACTIVITY']"
|
10
|
+
And I add a data row: "m << ['Monday', 'mowing']"
|
11
|
+
And I add another data row: "m << ['Tuesday', 'tutoring']"
|
12
|
+
And I add another data row: "m << ['Wednesday', 'welcoming']"
|
13
|
+
When I request the instance data table "m.table"
|
14
14
|
Then I receive an object that matches this Cucumber table
|
15
15
|
| DAY | ACTIVITY |
|
16
16
|
| Monday | mowing |
|
@@ -6,17 +6,17 @@ Feature: Drying up repetitive fields
|
|
6
6
|
|
7
7
|
|
8
8
|
Scenario: drying up repetitive columns
|
9
|
-
Given I
|
9
|
+
Given I have a Mortadella instance with a DRY column: "m = Mortadella.new headers: ['DAY', 'ACTIVITY'], dry: ['DAY']"
|
10
10
|
|
11
|
-
And I add an activity for Monday:
|
12
|
-
And I add another activity for Monday:
|
13
|
-
And I add another activity for Monday:
|
11
|
+
And I add an activity for Monday: "m << ['Monday', 'mowing']"
|
12
|
+
And I add another activity for Monday: "m << ['Monday', 'musing']"
|
13
|
+
And I add another activity for Monday: "m << ['Monday', 'mentoring']"
|
14
14
|
|
15
|
-
And I add an activity for Tuesday:
|
16
|
-
And I add another activity for Tuesday:
|
17
|
-
And I add another activity for Tuesday:
|
15
|
+
And I add an activity for Tuesday: "m << ['Tuesday', 'typing']"
|
16
|
+
And I add another activity for Tuesday: "m << ['Tuesday', 'tutoring']"
|
17
|
+
And I add another activity for Tuesday: "m << ['Tuesday', 'throwing']"
|
18
18
|
|
19
|
-
When I request the data table
|
19
|
+
When I request the instance data table "m.table"
|
20
20
|
Then I receive a table with repeated day names cleared out for better readability
|
21
21
|
| DAY | ACTIVITY |
|
22
22
|
| Monday | mowing |
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Feature: Verifying emptiness
|
2
|
+
|
3
|
+
As a Cucumber user
|
4
|
+
I want a programmatic way to verify emptiness of a Mortadella instance
|
5
|
+
So that I can verify the absence of data in comfortable ways.
|
6
|
+
|
7
|
+
|
8
|
+
Scenario: an empty table
|
9
|
+
Given I have a Mortadella instance: "m = Mortadella.new headers: ['foo']"
|
10
|
+
When I ask it whether it is empty: "m.empty?"
|
11
|
+
Then it responds with true
|
12
|
+
|
13
|
+
|
14
|
+
Scenario: a non-empty table
|
15
|
+
Given I have a Mortadella instance: "m = Mortadella.new headers: ['foo']"
|
16
|
+
And I add a data row: "m << ['bar']"
|
17
|
+
When I ask it whether it is empty: "m.empty?"
|
18
|
+
Then it responds with false
|
@@ -1,9 +1,15 @@
|
|
1
|
-
Given(/^I (?:add|create|request) .+? "(.+?)"$/) do |code|
|
1
|
+
Given(/^I (?:add|ask|create|have|request) .+? "(.+?)"$/) do |code|
|
2
2
|
@result = eval "@#{code}"
|
3
3
|
end
|
4
4
|
|
5
5
|
|
6
|
+
|
7
|
+
|
6
8
|
Then(/^I receive/) do |table|
|
7
9
|
table.diff! @result
|
8
10
|
end
|
9
11
|
|
12
|
+
|
13
|
+
Then(/^it responds with (.+?)$/) do |code|
|
14
|
+
@result = eval "@#{code}"
|
15
|
+
end
|
data/lib/mortadella.rb
CHANGED
data/mortadella.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "mortadella"
|
7
|
-
spec.version = "0.0.
|
7
|
+
spec.version = "0.0.2"
|
8
8
|
spec.authors = ["Kevin Goslar"]
|
9
9
|
spec.email = ["kevin.goslar@gmail.com"]
|
10
10
|
spec.summary = %q{Mock Ruby Table Delivery}
|
@@ -17,8 +17,8 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
-
spec.add_development_dependency "bundler", '~>
|
21
|
-
spec.add_development_dependency "rake", '~>
|
22
|
-
spec.add_development_dependency "cucumber", '~>
|
23
|
-
spec.add_development_dependency "rspec", '~>
|
20
|
+
spec.add_development_dependency "bundler", '~> 1'
|
21
|
+
spec.add_development_dependency "rake", '~> 10'
|
22
|
+
spec.add_development_dependency "cucumber", '~> 1'
|
23
|
+
spec.add_development_dependency "rspec", '~> 3'
|
24
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mortadella
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Goslar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '1'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '10'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '10'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: cucumber
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '1'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '3'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '3'
|
69
69
|
description: A tool to create Ruby table object to be used for Cucumber comparisons
|
70
70
|
email:
|
71
71
|
- kevin.goslar@gmail.com
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- Rakefile
|
82
82
|
- features/basic_usage.feature
|
83
83
|
- features/drying_up_fields.feature
|
84
|
+
- features/emptiness.feature
|
84
85
|
- features/step_definitions/steps.rb
|
85
86
|
- features/support/env.rb
|
86
87
|
- lib/mortadella.rb
|
@@ -112,5 +113,6 @@ summary: Mock Ruby Table Delivery
|
|
112
113
|
test_files:
|
113
114
|
- features/basic_usage.feature
|
114
115
|
- features/drying_up_fields.feature
|
116
|
+
- features/emptiness.feature
|
115
117
|
- features/step_definitions/steps.rb
|
116
118
|
- features/support/env.rb
|