rspec-rails 3.5.0.beta1 → 3.5.0.beta2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 08859ba10ff07a8c852ea2876b8a7ea64d67c2fb
4
- data.tar.gz: f7bd3a8ca6a57eb36cf785899477b50bc9e037bd
3
+ metadata.gz: f2599ac49b1376996b7132d3f81c4daa3b1aa0ac
4
+ data.tar.gz: c46ed773aa5944782475c31dce53453554512a60
5
5
  SHA512:
6
- metadata.gz: 4efe07fbf434ab02bf07c7b24a454bc5d4740398d9ecdd71087046cdbc02b41e046b5bf926cead6cceed9fc415218a35a46677bb57702eead1f01ab8d5b41221
7
- data.tar.gz: 0d3e500e662a15665e435e1b04df591ab87ce52877693d337cb2d9fd1591236154c509045758d530730d1180ed1e3b57d75f5126b948eb742ba97ced15b32eb9
6
+ metadata.gz: b0cca6c2e2cc6a5b8f5b9fe6bbd73f913bcc48408995c88bac754a680008206561b6199c60111423674ae7acd5a3e64082646b1eaf74cceb724d9910ea7702d9
7
+ data.tar.gz: ad281408ea5d8efeb9a41017b36913ef26933195b7c7e6f68020d311849d36660cc66d7adca2e29c677f6b20707530cda70ad9bc2daaaa96a316d52c75526fb3
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,6 +1,11 @@
1
1
  ### 3.5.0.development
2
2
  [Full Changelog](http://github.com/rspec/rspec-rails/compare/v3.4.2...v3.5.0.beta1)
3
3
 
4
+ Bug fxes:
5
+
6
+ * Make it possible to use floats in auto generated (scaffold) tests.
7
+ (Alwahsh, #1550)
8
+
4
9
  ### 3.5.0.beta1 2016-02-06
5
10
  [Full Changelog](http://github.com/rspec/rspec-rails/compare/v3.4.2...v3.5.0.beta1)
6
11
 
data/README.md CHANGED
@@ -285,7 +285,37 @@ gem "capybara"
285
285
  ```
286
286
 
287
287
  For more information, see the [cucumber scenarios for feature
288
- specs](https://www.relishapp.com/rspec/rspec-rails/v/3-0/docs/feature-specs/feature-spec).
288
+ specs](https://www.relishapp.com/rspec/rspec-rails/v/3-4/docs/feature-specs/feature-spec).
289
+
290
+ ## Mailer specs
291
+
292
+ By default Mailer specs reside in the `spec/mailers` folder. Adding the metadata
293
+ `:type => :mailer` to any context makes its examples be treated as mailer specs.
294
+
295
+ `ActionMailer::TestCase::Behavior` is mixed into your mailer specs.
296
+
297
+ ```ruby
298
+ require "rails_helper"
299
+
300
+ RSpec.describe Notifications, :type => :mailer do
301
+ describe "notify" do
302
+ let(:mail) { Notifications.signup }
303
+
304
+ it "renders the headers" do
305
+ expect(mail.subject).to eq("Signup")
306
+ expect(mail.to).to eq(["to@example.org"])
307
+ expect(mail.from).to eq(["from@example.com"])
308
+ end
309
+
310
+ it "renders the body" do
311
+ expect(mail.body.encoded).to match("Hi")
312
+ end
313
+ end
314
+ end
315
+ ```
316
+
317
+ For more information, see the [cucumber scenarios for mailer specs
318
+ ](https://relishapp.com/rspec/rspec-rails/v/3-4/docs/mailer-specs).
289
319
 
290
320
  ## View specs
291
321
 
@@ -150,9 +150,9 @@ module Rspec
150
150
  case attribute.type
151
151
  when :string
152
152
  attribute.name.titleize
153
- when :integer
153
+ when :integer, :float
154
154
  @attribute_id_map ||= {}
155
- @attribute_id_map[attribute] ||= @attribute_id_map.keys.size.next
155
+ @attribute_id_map[attribute] ||= @attribute_id_map.keys.size.next + attribute.default
156
156
  else
157
157
  attribute.default
158
158
  end
@@ -11,6 +11,12 @@ module RSpec
11
11
  include RSpec::Rails::Matchers::RenderTemplate
12
12
  include ActionController::TemplateAssertions
13
13
 
14
+ begin
15
+ include ActionDispatch::IntegrationTest::Behavior
16
+ rescue NameError # rubocop:disable Lint/HandleExceptions
17
+ # rails is too old to provide integration test helpers
18
+ end
19
+
14
20
  # Delegates to `Rails.application`.
15
21
  def app
16
22
  ::Rails.application
@@ -3,7 +3,7 @@ module RSpec
3
3
  # Version information for RSpec Rails.
4
4
  module Version
5
5
  # Current version of RSpec Rails, in semantic versioning format.
6
- STRING = '3.5.0.beta1'
6
+ STRING = '3.5.0.beta2'
7
7
  end
8
8
  end
9
9
  end
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: 3.5.0.beta1
4
+ version: 3.5.0.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Chelimsky
@@ -44,7 +44,7 @@ cert_chain:
44
44
  ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
45
45
  F3MdtaDehhjC
46
46
  -----END CERTIFICATE-----
47
- date: 2016-02-06 00:00:00.000000000 Z
47
+ date: 2016-03-10 00:00:00.000000000 Z
48
48
  dependencies:
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: activesupport
@@ -94,70 +94,56 @@ dependencies:
94
94
  requirements:
95
95
  - - '='
96
96
  - !ruby/object:Gem::Version
97
- version: 3.5.0.beta1
97
+ version: 3.5.0.beta2
98
98
  type: :runtime
99
99
  prerelease: false
100
100
  version_requirements: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - '='
103
103
  - !ruby/object:Gem::Version
104
- version: 3.5.0.beta1
104
+ version: 3.5.0.beta2
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: rspec-expectations
107
107
  requirement: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - '='
110
110
  - !ruby/object:Gem::Version
111
- version: 3.5.0.beta1
111
+ version: 3.5.0.beta2
112
112
  type: :runtime
113
113
  prerelease: false
114
114
  version_requirements: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - '='
117
117
  - !ruby/object:Gem::Version
118
- version: 3.5.0.beta1
118
+ version: 3.5.0.beta2
119
119
  - !ruby/object:Gem::Dependency
120
120
  name: rspec-mocks
121
121
  requirement: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - '='
124
124
  - !ruby/object:Gem::Version
125
- version: 3.5.0.beta1
125
+ version: 3.5.0.beta2
126
126
  type: :runtime
127
127
  prerelease: false
128
128
  version_requirements: !ruby/object:Gem::Requirement
129
129
  requirements:
130
130
  - - '='
131
131
  - !ruby/object:Gem::Version
132
- version: 3.5.0.beta1
132
+ version: 3.5.0.beta2
133
133
  - !ruby/object:Gem::Dependency
134
134
  name: rspec-support
135
135
  requirement: !ruby/object:Gem::Requirement
136
136
  requirements:
137
137
  - - '='
138
138
  - !ruby/object:Gem::Version
139
- version: 3.5.0.beta1
139
+ version: 3.5.0.beta2
140
140
  type: :runtime
141
141
  prerelease: false
142
142
  version_requirements: !ruby/object:Gem::Requirement
143
143
  requirements:
144
144
  - - '='
145
145
  - !ruby/object:Gem::Version
146
- version: 3.5.0.beta1
147
- - !ruby/object:Gem::Dependency
148
- name: rake
149
- requirement: !ruby/object:Gem::Requirement
150
- requirements:
151
- - - "~>"
152
- - !ruby/object:Gem::Version
153
- version: '10.0'
154
- type: :development
155
- prerelease: false
156
- version_requirements: !ruby/object:Gem::Requirement
157
- requirements:
158
- - - "~>"
159
- - !ruby/object:Gem::Version
160
- version: '10.0'
146
+ version: 3.5.0.beta2
161
147
  - !ruby/object:Gem::Dependency
162
148
  name: cucumber
163
149
  requirement: !ruby/object:Gem::Requirement
@@ -304,7 +290,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
304
290
  version: 1.3.1
305
291
  requirements: []
306
292
  rubyforge_project:
307
- rubygems_version: 2.4.5.1
293
+ rubygems_version: 2.5.1
308
294
  signing_key:
309
295
  specification_version: 4
310
296
  summary: RSpec for Rails
metadata.gz.sig CHANGED
Binary file