rspec-rails 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ === Version 1.3.1 / 2010-01-12
2
+
3
+ * bug fix
4
+ * ensure that Spec::Rails module is defined (Jack Chen and Ryan Bigg).
5
+ Closes #939.
6
+
1
7
  === Version 1.3.0 / 2010-01-11
2
8
 
3
9
  * enhancements
@@ -1,13 +1,3 @@
1
- dir = File.dirname(__FILE__)
2
- require 'spec/rails/matchers/ar_be_valid'
3
- require 'spec/rails/matchers/assert_select'
4
- require 'spec/rails/matchers/change'
5
- require 'spec/rails/matchers/have_text'
6
- require 'spec/rails/matchers/include_text'
7
- require 'spec/rails/matchers/redirect_to'
8
- require 'spec/rails/matchers/route_to'
9
- require 'spec/rails/matchers/render_template'
10
-
11
1
  module Spec
12
2
  module Rails
13
3
  # Spec::Rails::Expectations::Matchers provides several expectation matchers
@@ -31,3 +21,12 @@ module Spec
31
21
  end
32
22
  end
33
23
  end
24
+
25
+ require 'spec/rails/matchers/ar_be_valid'
26
+ require 'spec/rails/matchers/assert_select'
27
+ require 'spec/rails/matchers/change'
28
+ require 'spec/rails/matchers/have_text'
29
+ require 'spec/rails/matchers/include_text'
30
+ require 'spec/rails/matchers/redirect_to'
31
+ require 'spec/rails/matchers/route_to'
32
+ require 'spec/rails/matchers/render_template'
@@ -1,23 +1,27 @@
1
1
  if defined?(ActiveRecord::Base)
2
- module Spec::Rails::Matchers
3
- # :call-seq:
4
- # response.should be_valid
5
- # response.should_not be_valid
6
- def be_valid
7
- ::Spec::Matchers::Matcher.new :be_valid do
8
- match do |actual|
9
- actual.valid?
10
- end
2
+ module Spec
3
+ module Rails
4
+ module Matchers
5
+ # :call-seq:
6
+ # response.should be_valid
7
+ # response.should_not be_valid
8
+ def be_valid
9
+ ::Spec::Matchers::Matcher.new :be_valid do
10
+ match do |actual|
11
+ actual.valid?
12
+ end
11
13
 
12
- failure_message_for_should do |actual|
13
- if actual.respond_to?(:errors) && ActiveRecord::Errors === actual.errors
14
- "Expected #{actual.inspect} to be valid, but it was not\nErrors: " + actual.errors.full_messages.join(", ")
15
- else
16
- "Expected #{actual.inspect} to be valid"
14
+ failure_message_for_should do |actual|
15
+ if actual.respond_to?(:errors) && ActiveRecord::Errors === actual.errors
16
+ "Expected #{actual.inspect} to be valid, but it was not\nErrors: " + actual.errors.full_messages.join(", ")
17
+ else
18
+ "Expected #{actual.inspect} to be valid"
19
+ end
20
+ end
17
21
  end
18
22
  end
23
+
19
24
  end
20
25
  end
21
-
22
26
  end
23
27
  end
@@ -4,7 +4,7 @@ module Spec # :nodoc:
4
4
  unless defined? MAJOR
5
5
  MAJOR = 1
6
6
  MINOR = 3
7
- TINY = 0
7
+ TINY = 1
8
8
  PRE = nil
9
9
 
10
10
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - RSpec Development Team
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-11 00:00:00 -06:00
12
+ date: 2010-01-12 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -237,7 +237,7 @@ licenses: []
237
237
  post_install_message: |
238
238
  **************************************************
239
239
 
240
- Thank you for installing rspec-rails-1.3.0
240
+ Thank you for installing rspec-rails-1.3.1
241
241
 
242
242
  If you are upgrading, do this in each of your rails apps
243
243
  that you want to upgrade:
@@ -272,6 +272,6 @@ rubyforge_project: rspec
272
272
  rubygems_version: 1.3.5
273
273
  signing_key:
274
274
  specification_version: 3
275
- summary: rspec-rails 1.3.0
275
+ summary: rspec-rails 1.3.1
276
276
  test_files: []
277
277