brightbox-rspec-rails-ext 1.6.0 → 1.6.1
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/CHANGELOG +1 -0
- data/lib/mocks.rb +9 -0
- data/rspec-rails-ext.gemspec +2 -2
- metadata +2 -2
data/CHANGELOG
CHANGED
data/lib/mocks.rb
CHANGED
|
@@ -22,6 +22,15 @@ module Spec
|
|
|
22
22
|
prepare_for_errors_on model
|
|
23
23
|
return model
|
|
24
24
|
end
|
|
25
|
+
|
|
26
|
+
# Shortcut to create a model that will be used in an association
|
|
27
|
+
# Example:
|
|
28
|
+
# @model = MasterModel.create!
|
|
29
|
+
# @mock = associated_model ChildModel, :some => :value
|
|
30
|
+
# @model.children << @mock
|
|
31
|
+
def associated_model class_name, stubs = {}
|
|
32
|
+
mock_model class_name, stubs.merge(:[]= => true, :save => true)
|
|
33
|
+
end
|
|
25
34
|
end
|
|
26
35
|
end
|
|
27
36
|
end
|
data/rspec-rails-ext.gemspec
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = %q{rspec-rails-ext}
|
|
5
|
-
s.version = "1.6.
|
|
5
|
+
s.version = "1.6.1"
|
|
6
6
|
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
|
8
8
|
s.authors = ["Rahoul Baruah and Caius Durling"]
|
|
9
|
-
s.date = %q{2009-02-
|
|
9
|
+
s.date = %q{2009-02-23}
|
|
10
10
|
s.description = %q{Helpers for prettying up your RSpec-Rails specifications}
|
|
11
11
|
s.email = %q{support@brightbox.co.uk}
|
|
12
12
|
s.extra_rdoc_files = ["CHANGELOG", "lib/controller_example_group.rb", "lib/mocks.rb", "lib/responses.rb", "lib/rspec_rails_extensions.rb", "README.rdoc"]
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: brightbox-rspec-rails-ext
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rahoul Baruah and Caius Durling
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-02-
|
|
12
|
+
date: 2009-02-23 00:00:00 -08:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|