rspec-rails 2.0.0.beta.1 → 2.0.0.beta.2
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/Rakefile +7 -7
- data/VERSION +1 -1
- data/lib/generators/rspec/scaffold/templates/edit_spec.rb +0 -2
- data/lib/generators/rspec/scaffold/templates/index_spec.rb +0 -2
- data/lib/generators/rspec/scaffold/templates/new_spec.rb +0 -2
- data/lib/generators/rspec/scaffold/templates/show_spec.rb +0 -1
- data/lib/rspec/rails/example/controller_example_group.rb +1 -1
- data/lib/rspec/rails/example/request_example_group.rb +2 -2
- data/lib/rspec/rails/example/view_example_group.rb +2 -6
- data/lib/rspec/rails/matchers.rb +12 -1
- metadata +7 -7
data/Rakefile
CHANGED
@@ -48,15 +48,15 @@ namespace :generate do
|
|
48
48
|
else
|
49
49
|
puts <<-MESSAGE
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
You need to install rails in ./tmp/rails before you can run the
|
52
|
+
#{t.name} task:
|
53
|
+
|
54
|
+
git clone git://github.com/rails/rails tmp/rails
|
55
55
|
|
56
|
-
|
57
|
-
|
56
|
+
(We'll automate this eventually, but running 'git clone' from rake in this
|
57
|
+
project is mysteriously full of fail)
|
58
58
|
|
59
|
-
|
59
|
+
MESSAGE
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.0.beta.
|
1
|
+
2.0.0.beta.2
|
@@ -2,8 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
<% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%>
|
4
4
|
describe "<%= table_name %>/edit.html.<%= options[:template_engine] %>" do
|
5
|
-
include <%= controller_class_name %>Helper
|
6
|
-
|
7
5
|
before(:each) do
|
8
6
|
assign(:<%= file_name %>, @<%= file_name %> = stub_model(<%= class_name %>,
|
9
7
|
:new_record? => false<%= output_attributes.empty? ? '' : ',' %>
|
@@ -2,8 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
<% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%>
|
4
4
|
describe "<%= table_name %>/index.html.<%= options[:template_engine] %>" do
|
5
|
-
include <%= controller_class_name %>Helper
|
6
|
-
|
7
5
|
before(:each) do
|
8
6
|
assign(:<%= table_name %>, [
|
9
7
|
<% [1,2].each_with_index do |id, model_index| -%>
|
@@ -2,8 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
<% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%>
|
4
4
|
describe "<%= table_name %>/new.html.<%= options[:template_engine] %>" do
|
5
|
-
include <%= controller_class_name %>Helper
|
6
|
-
|
7
5
|
before(:each) do
|
8
6
|
assign(:<%= file_name %>, stub_model(<%= class_name %>,
|
9
7
|
:new_record? => true<%= output_attributes.empty? ? '' : ',' %>
|
@@ -2,7 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
<% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%>
|
4
4
|
describe "<%= table_name %>/show.html.<%= options[:template_engine] %>" do
|
5
|
-
include <%= controller_class_name %>Helper
|
6
5
|
before(:each) do
|
7
6
|
assign(:<%= file_name %>, @<%= file_name %> = stub_model(<%= class_name %><%= output_attributes.empty? ? ')' : ',' %>
|
8
7
|
<% output_attributes.each_with_index do |attribute, attribute_index| -%>
|
@@ -11,12 +11,12 @@ module RequestExampleGroupBehaviour
|
|
11
11
|
def self.included(mod)
|
12
12
|
mod.before do
|
13
13
|
@_result = Struct.new(:add_assertion).new
|
14
|
-
@router = Rails.application.routes
|
14
|
+
@router = ::Rails.application.routes
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
18
|
def app
|
19
|
-
Rails.application
|
19
|
+
::Rails.application
|
20
20
|
end
|
21
21
|
|
22
22
|
Webrat.configure do |config|
|
@@ -8,14 +8,10 @@ module ViewExampleGroupBehaviour
|
|
8
8
|
attr_accessor :controller_path
|
9
9
|
end
|
10
10
|
|
11
|
-
module ViewExtensions
|
12
|
-
def protect_against_forgery?; end
|
13
|
-
end
|
14
|
-
|
15
11
|
def view
|
16
12
|
@view ||= begin
|
17
13
|
view = ActionView::Base.new(ActionController::Base.view_paths, assigns, controller)
|
18
|
-
view.extend
|
14
|
+
view.extend(Module.new { def protect_against_forgery?; end })
|
19
15
|
view
|
20
16
|
end
|
21
17
|
end
|
@@ -33,7 +29,7 @@ module ViewExampleGroupBehaviour
|
|
33
29
|
end
|
34
30
|
|
35
31
|
def file_to_render
|
36
|
-
running_example.
|
32
|
+
running_example.example_group.description
|
37
33
|
end
|
38
34
|
|
39
35
|
def controller_path
|
data/lib/rspec/rails/matchers.rb
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
require 'rspec/matchers'
|
2
|
-
|
2
|
+
|
3
|
+
#try to fix load error for ruby1.9.1
|
4
|
+
begin
|
5
|
+
require 'test/unit/assertionfailederror'
|
6
|
+
rescue LoadError
|
7
|
+
module Test
|
8
|
+
module Unit
|
9
|
+
class AssertionFailedError < StandardError
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
3
14
|
|
4
15
|
module Rspec
|
5
16
|
module Rails
|
metadata
CHANGED
@@ -7,8 +7,8 @@ version: !ruby/object:Gem::Version
|
|
7
7
|
- 0
|
8
8
|
- 0
|
9
9
|
- beta
|
10
|
-
-
|
11
|
-
version: 2.0.0.beta.
|
10
|
+
- 2
|
11
|
+
version: 2.0.0.beta.2
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- David Chelimsky
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-03-
|
20
|
+
date: 2010-03-04 00:00:00 -06:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
@@ -32,8 +32,8 @@ dependencies:
|
|
32
32
|
- 0
|
33
33
|
- 0
|
34
34
|
- beta
|
35
|
-
-
|
36
|
-
version: 2.0.0.beta.
|
35
|
+
- 2
|
36
|
+
version: 2.0.0.beta.2
|
37
37
|
type: :runtime
|
38
38
|
version_requirements: *id001
|
39
39
|
- !ruby/object:Gem::Dependency
|
@@ -114,7 +114,7 @@ licenses: []
|
|
114
114
|
post_install_message: |
|
115
115
|
**************************************************
|
116
116
|
|
117
|
-
Thank you for installing rspec-rails-2.0.0.beta.
|
117
|
+
Thank you for installing rspec-rails-2.0.0.beta.2!
|
118
118
|
|
119
119
|
This version of rspec-rails only works with
|
120
120
|
versions of rails >= 3.0.0.pre.
|
@@ -151,6 +151,6 @@ rubyforge_project: rspec
|
|
151
151
|
rubygems_version: 1.3.6
|
152
152
|
signing_key:
|
153
153
|
specification_version: 3
|
154
|
-
summary: rspec-rails-2.0.0.beta.
|
154
|
+
summary: rspec-rails-2.0.0.beta.2
|
155
155
|
test_files: []
|
156
156
|
|