brightbox-rspec-rails-ext 1.001 → 1.003
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 +2 -0
- data/README.rdoc +8 -0
- data/Rakefile +1 -0
- data/lib/rspec_rails_extensions.rb +2 -0
- data/rspec-rails-ext.gemspec +2 -2
- metadata +2 -2
data/CHANGELOG
CHANGED
data/README.rdoc
CHANGED
|
@@ -10,6 +10,14 @@ Then, within your config/environment.rb:
|
|
|
10
10
|
|
|
11
11
|
config.gem 'brightbox-rspec-rails-ext', :lib => 'rspec_rails_extensions', :source => 'http://gems.github.com'
|
|
12
12
|
|
|
13
|
+
== ActiveRecord::RecordInvalid
|
|
14
|
+
|
|
15
|
+
If you try to call ActiveRecord::RecordInvalid.new(@my_object) where @my_object is a mock then your exception will not be raised; instead you get a cryptic error. This is because RecordInvalid expects to be able to call certain methods on your ActiveRecord model, which your mock isn't set up for. So instead, prepare your mock, like so:
|
|
16
|
+
|
|
17
|
+
@thingy = mock_model Thingy
|
|
18
|
+
prepare_for_errors_on @thingy
|
|
19
|
+
raise ActiveRecord::RecordInvalid.new(@thingy)
|
|
20
|
+
|
|
13
21
|
== Matchers
|
|
14
22
|
|
|
15
23
|
Some helpful matchers for testing HTTP statuses beyond the default be_success (200 OK)
|
data/Rakefile
CHANGED
data/rspec-rails-ext.gemspec
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = %q{rspec-rails-ext}
|
|
5
|
-
s.version = "1.
|
|
5
|
+
s.version = "1.003"
|
|
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"]
|
|
9
9
|
s.date = %q{2009-02-13}
|
|
10
10
|
s.description = %q{Helpers for prettying up your RSpec-Rails specifications}
|
|
11
|
-
s.email = %q{}
|
|
11
|
+
s.email = %q{support@brightbox.co.uk}
|
|
12
12
|
s.extra_rdoc_files = ["CHANGELOG", "lib/controller_example_group.rb", "lib/responses.rb", "lib/rspec_rails_extensions.rb", "README.rdoc"]
|
|
13
13
|
s.files = ["CHANGELOG", "lib/controller_example_group.rb", "lib/responses.rb", "lib/rspec_rails_extensions.rb", "LICENCE", "Manifest", "Rakefile", "README.rdoc", "rspec-rails-ext.gemspec"]
|
|
14
14
|
s.has_rdoc = true
|
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.
|
|
4
|
+
version: "1.003"
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rahoul Baruah
|
|
@@ -22,7 +22,7 @@ dependencies:
|
|
|
22
22
|
version: "0"
|
|
23
23
|
version:
|
|
24
24
|
description: Helpers for prettying up your RSpec-Rails specifications
|
|
25
|
-
email:
|
|
25
|
+
email: support@brightbox.co.uk
|
|
26
26
|
executables: []
|
|
27
27
|
|
|
28
28
|
extensions: []
|