cucumber-openerpscenario 0.1.3 → 0.1.4

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.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{cucumber-openerpscenario}
3
- s.version = "0.1.3"
3
+ s.version = "0.1.4"
4
4
  s.date = %q{2013-03-06}
5
5
  s.authors = ["Nicolas Bessi - Camptocamp"]
6
6
  s.summary = %q{cucumber on OpenERP}
Binary file
@@ -75,7 +75,32 @@ Given /^I (create|need|should have|find|find or create) (a|all|last) "([^"]*)" w
75
75
  get_items(action, qty, model, args)
76
76
  end
77
77
 
78
- Given /^having$/ do |table|
78
+ Given /^(having:|prepared with:)$/ do |mode, table|
79
+ @found_item.should_not be_nil,
80
+ "No item to set attribute found"
79
81
  manage_item_table(@found_item, table)
82
+ unless mode == 'prepared with:'
83
+ @found_item.save
84
+ end
85
+ end
86
+
87
+ Given /^having$/ do |table|
88
+ $utils.log.warn "Deprecated sentence, please use this one : \"having:\""
89
+ step "having:", table
90
+ end
91
+
92
+ Given /^I save$/ do
93
+ @found_item.should_not be_nil,
94
+ "No item to set attribute found"
80
95
  @found_item.save
81
- end
96
+ end
97
+
98
+ Then /^I remove the Log fields$/ do
99
+ # weird hack
100
+ # for some objects, a bug forbid to save a resource
101
+ # and we have to delete the log columns before save them
102
+ @found_item.associations.delete('write_uid')
103
+ @found_item.associations.delete('create_uid')
104
+ @found_item.attributes.delete('write_date')
105
+ @found_item.attributes.delete('create_date')
106
+ end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: cucumber-openerpscenario
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.3
5
+ version: 0.1.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Nicolas Bessi - Camptocamp
@@ -84,6 +84,7 @@ files:
84
84
  - cucumber-openerpscenario-0.1.0.gem
85
85
  - cucumber-openerpscenario-0.1.1.gem
86
86
  - cucumber-openerpscenario-0.1.2.gem
87
+ - cucumber-openerpscenario-0.1.3.gem
87
88
  - lib/.DS_Store
88
89
  - lib/cucumber/.DS_Store
89
90
  - lib/cucumber/lib/.DS_Store