makandra-cucumber_factory 1.1.6 → 1.1.7
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/VERSION +1 -1
- data/cucumber_factory.gemspec +2 -2
- data/lib/cucumber_factory/factory.rb +1 -1
- data/spec/app_root/db/migrate/001_create_movies.rb +1 -0
- data/spec/factory_spec.rb +5 -1
- metadata +4 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.7
|
data/cucumber_factory.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{cucumber_factory}
|
5
|
-
s.version = "1.1.
|
5
|
+
s.version = "1.1.7"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Henning Koch"]
|
9
|
-
s.date = %q{2009-09-
|
9
|
+
s.date = %q{2009-09-18}
|
10
10
|
s.description = %q{Cucumber Factory allows you to create ActiveRecord models from your Cucumber features without writing step definitions for each model.}
|
11
11
|
s.email = %q{github@makandra.de}
|
12
12
|
s.extra_rdoc_files = [
|
@@ -46,7 +46,7 @@ module Cucumber
|
|
46
46
|
if raw_attributes.present? && raw_attributes.strip.present?
|
47
47
|
raw_attributes.scan(/(the|and|with| )+(.*?) ("([^\"]*)"|above)/).each do |fragment|
|
48
48
|
value = nil
|
49
|
-
attribute = fragment[1].to_sym
|
49
|
+
attribute = fragment[1].gsub(" ", "_").to_sym
|
50
50
|
value_type = fragment[2] # 'above' or a quoted string
|
51
51
|
value = fragment[3]
|
52
52
|
association = model_class.reflect_on_association(attribute)
|
data/spec/factory_spec.rb
CHANGED
@@ -31,7 +31,6 @@ describe Cucumber::Factory do
|
|
31
31
|
before(:each) do
|
32
32
|
@world = Object.new
|
33
33
|
end
|
34
|
-
|
35
34
|
|
36
35
|
it "should create records" do
|
37
36
|
Movie.should_receive(:create!).with({})
|
@@ -43,6 +42,11 @@ describe Cucumber::Factory do
|
|
43
42
|
Cucumber::Factory.parse(@world, 'Given there is a movie with the title "Sunshine" and the year "2007"')
|
44
43
|
end
|
45
44
|
|
45
|
+
it "should create records with attributes containing spaces" do
|
46
|
+
Movie.should_receive(:create!).with({ :box_office_result => "99999999" })
|
47
|
+
Cucumber::Factory.parse(@world, 'Given there is a movie with the box office result "99999999"')
|
48
|
+
end
|
49
|
+
|
46
50
|
it "should set instance variables in the world" do
|
47
51
|
Cucumber::Factory.parse(@world, 'Given "Sunshine" is a movie with the title "Sunshine" and the year "2007"')
|
48
52
|
@world.instance_variable_get(:'@sunshine').title.should == "Sunshine"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: makandra-cucumber_factory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henning Koch
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-18 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- spec/spec_helper.rb
|
54
54
|
has_rdoc: true
|
55
55
|
homepage: http://github.com/makandra/cucumber_factory
|
56
|
+
licenses:
|
56
57
|
post_install_message:
|
57
58
|
rdoc_options:
|
58
59
|
- --charset=UTF-8
|
@@ -73,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
74
|
requirements: []
|
74
75
|
|
75
76
|
rubyforge_project:
|
76
|
-
rubygems_version: 1.
|
77
|
+
rubygems_version: 1.3.5
|
77
78
|
signing_key:
|
78
79
|
specification_version: 2
|
79
80
|
summary: Create records from Cucumber features without writing step definitions.
|