shoulda_create 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -81,4 +81,18 @@ module ShouldaCreate
81
81
  assert_equal old_value, new_value, "#{description} changed"
82
82
  end
83
83
  end
84
+
85
+ def get_options!(args, *wanted)
86
+ ret = []
87
+ opts = (args.last.is_a?(Hash) ? args.pop : {})
88
+ wanted.each {|w| ret << opts.delete(w)}
89
+ wanted.each {|w| ret << opts.delete(w) }
90
+ raise ArgumentError, "Unsupported options given: #{opts.keys.join(', ')}" unless opts.keys.empty?
91
+ return *ret
92
+ if ret.compact.empty?
93
+ return nil
94
+ else
95
+ return *ret
96
+ end
97
+ end
84
98
  end
metadata CHANGED
@@ -1,13 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoulda_create
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
5
- prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 1
10
- version: 0.0.1
4
+ version: 0.0.2
11
5
  platform: ruby
12
6
  authors:
13
7
  - Bill Kirtley
@@ -15,7 +9,8 @@ autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
11
 
18
- date: 2012-02-16 00:00:00 Z
12
+ date: 2012-10-13 00:00:00 -04:00
13
+ default_executable:
19
14
  dependencies: []
20
15
 
21
16
  description: I like using should_create and friends to make assertions about records coming and going in the database. Shoulda did, but doesn't any more. With this, it can again.
@@ -31,6 +26,7 @@ files:
31
26
  - lib/shoulda_create/test_unit.rb
32
27
  - lib/shoulda_create.rb
33
28
  - README.rdoc
29
+ has_rdoc: true
34
30
  homepage: http://github.com/cluesque/shoulda_create
35
31
  licenses: []
36
32
 
@@ -40,27 +36,21 @@ rdoc_options: []
40
36
  require_paths:
41
37
  - lib
42
38
  required_ruby_version: !ruby/object:Gem::Requirement
43
- none: false
44
39
  requirements:
45
40
  - - ">="
46
41
  - !ruby/object:Gem::Version
47
- hash: 3
48
- segments:
49
- - 0
50
42
  version: "0"
43
+ version:
51
44
  required_rubygems_version: !ruby/object:Gem::Requirement
52
- none: false
53
45
  requirements:
54
46
  - - ">="
55
47
  - !ruby/object:Gem::Version
56
- hash: 3
57
- segments:
58
- - 0
59
48
  version: "0"
49
+ version:
60
50
  requirements: []
61
51
 
62
52
  rubyforge_project:
63
- rubygems_version: 1.8.15
53
+ rubygems_version: 1.3.5
64
54
  signing_key:
65
55
  specification_version: 3
66
56
  summary: Restores should_create functionality to shoulda.