active_cucumber 0.2.1 → 1.0.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/Gemfile.lock +4 -4
- data/README.md +9 -2
- data/active_cucumber.gemspec +1 -1
- data/lib/active_cucumber/active_record_builder.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bce953289c746351ec8d20989d7ee053ba1350a3
|
4
|
+
data.tar.gz: 09cdbdbddcceb91aa82000d6b86b856a12ed66cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6176ae5507fe390ddb9dc53c6898c07dfda85ccde07b362755cb956c5c6d9927e7b4d02dd9e732ffc4201e3c9ab18d1f6afefdcf92b9e0ca7342dc5aaf6359d1
|
7
|
+
data.tar.gz: b61c4e86ff167e45f89fb67d30c35000ead2efb3c72659fb314b91b8295b46cf9a16f180070efa2ddf0add06d5771b93d796dacf8f469e0a6b9d334e4703ca5f
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
active_cucumber (0.
|
4
|
+
active_cucumber (1.0.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -49,7 +49,7 @@ GEM
|
|
49
49
|
docile (1.1.5)
|
50
50
|
domain_name (0.5.25)
|
51
51
|
unf (>= 0.0.5, < 1.0.0)
|
52
|
-
factory_girl (4.
|
52
|
+
factory_girl (4.7.0)
|
53
53
|
activesupport (>= 3.0.0)
|
54
54
|
faker (1.6.1)
|
55
55
|
i18n (~> 0.5)
|
@@ -62,7 +62,7 @@ GEM
|
|
62
62
|
json (1.8.3)
|
63
63
|
kappamaki (0.0.3)
|
64
64
|
mime-types (2.99)
|
65
|
-
minitest (5.8.
|
65
|
+
minitest (5.8.4)
|
66
66
|
mortadella (0.2.2)
|
67
67
|
multi_json (1.11.2)
|
68
68
|
multi_test (0.1.2)
|
@@ -137,4 +137,4 @@ DEPENDENCIES
|
|
137
137
|
sqlite3
|
138
138
|
|
139
139
|
BUNDLED WITH
|
140
|
-
1.
|
140
|
+
1.11.2
|
data/README.md
CHANGED
@@ -1,14 +1,21 @@
|
|
1
1
|
# ActiveCucumber
|
2
|
-
[](https://circleci.com/gh/Originate/active_cucumber) [](https://codeclimate.com/github/Originate/active_cucumber) [](https://gemnasium.com/Originate/active_cucumber) [](https://coveralls.io/github/Originate/active_cucumber?branch=kg-coveralls)
|
2
|
+
[](https://circleci.com/gh/Originate/active_cucumber) [](https://codeclimate.com/github/Originate/active_cucumber) [](https://gemnasium.com/Originate/active_cucumber) [](https://coveralls.io/github/Originate/active_cucumber?branch=kg-coveralls)
|
3
3
|
|
4
4
|
High-level Cucumber helpers for performing
|
5
5
|
[ActiveRecord](http://guides.rubyonrails.org/active_record_basics.html)-based
|
6
6
|
database operations using Cucumber tables in tests.
|
7
7
|
|
8
8
|
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
* add `gem 'active_cucumber'` to your Gemfile
|
12
|
+
* run `bundle install`
|
13
|
+
* make sure you have your [FactoryGirl factories](https://github.com/thoughtbot/factory_girl) set up and loaded
|
14
|
+
|
15
|
+
|
9
16
|
## Creating database records
|
10
17
|
|
11
|
-
ActiveCucumber allows to create ActiveRecord objects from data in Cucumber tables.
|
18
|
+
ActiveCucumber allows to create ActiveRecord objects from data in Cucumber tables using [FactoryGirl factories](https://github.com/thoughtbot/factory_girl).
|
12
19
|
|
13
20
|
Let's assume we have an application that stores TV shows and their episodes.
|
14
21
|
|
data/active_cucumber.gemspec
CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = 'active_cucumber'
|
6
|
-
s.version = '0.
|
6
|
+
s.version = '1.0.0'
|
7
7
|
s.authors = ['Kevin Goslar']
|
8
8
|
s.email = ['kevin.goslar@gmail.com']
|
9
9
|
s.summary = %s(ActiveRecord tools for Cucumber)
|
@@ -26,7 +26,7 @@ module ActiveCucumber
|
|
26
26
|
# Creates a new record with the given attributes in the database
|
27
27
|
def create_record attributes
|
28
28
|
creator = @creator_class.new attributes, @context
|
29
|
-
FactoryGirl.create @clazz, creator.factorygirl_attributes
|
29
|
+
FactoryGirl.create @clazz.name.underscore.to_sym, creator.factorygirl_attributes
|
30
30
|
end
|
31
31
|
|
32
32
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Goslar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|