rspec-rails 2.0.0.beta.1 → 2.0.0.beta.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -48,15 +48,15 @@ namespace :generate do
48
48
  else
49
49
  puts <<-MESSAGE
50
50
 
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
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
- (We'll automate this eventually, but running 'git clone' from rake in this
57
- project is mysteriously full of fail)
56
+ (We'll automate this eventually, but running 'git clone' from rake in this
57
+ project is mysteriously full of fail)
58
58
 
59
- MESSAGE
59
+ MESSAGE
60
60
  end
61
61
  end
62
62
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0.beta.1
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| -%>
@@ -15,7 +15,7 @@ module ControllerExampleGroupBehaviour
15
15
  end
16
16
 
17
17
  def app
18
- self.class.described_class.action(@_action).tap do |endpoint|
18
+ described_class.action(@_action).tap do |endpoint|
19
19
  def endpoint.routes
20
20
  Rails.application.routes
21
21
  end
@@ -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 ViewExtensions
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.metadata[:example_group][:description]
32
+ running_example.example_group.description
37
33
  end
38
34
 
39
35
  def controller_path
@@ -1,5 +1,16 @@
1
1
  require 'rspec/matchers'
2
- require 'test/unit/assertionfailederror'
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
- - 1
11
- version: 2.0.0.beta.1
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-01 00:00:00 -06:00
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
- - 1
36
- version: 2.0.0.beta.1
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.1!
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.1
154
+ summary: rspec-rails-2.0.0.beta.2
155
155
  test_files: []
156
156