rspec-rails 2.0.0.beta.6 → 2.0.0.beta.7

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,2 +1,4 @@
1
1
  tmp
2
2
  pkg
3
+ .bundle
4
+ rspec-rails-
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source "http://rubygems.org"
2
+ gem 'rails', :path => "./tmp/rails"
3
+ gem 'rspec', '>= 2.0.0.beta'
4
+ gem 'cucumber'
5
+ gem 'aruba'
6
+ gem 'jeweler'
7
+ gem 'webrat'
8
+
data/Rakefile CHANGED
@@ -77,7 +77,7 @@ namespace :generate do
77
77
  desc "generate a fresh app with rspec installed"
78
78
  task :app => ["rails:clone"] do |t|
79
79
  unless File.directory?('./tmp/example_app')
80
- ruby "./tmp/rails/railties/bin/rails tmp/example_app --dev -m example_app_template.rb"
80
+ ruby "./tmp/rails/bin/rails tmp/example_app --dev -m example_app_template.rb"
81
81
  end
82
82
  end
83
83
 
@@ -124,5 +124,11 @@ namespace :clobber do
124
124
  end
125
125
  end
126
126
 
127
- task :default => ["clobber:app", "generate:app", "generate:stuff", :spec, :cucumber, :smoke]
127
+ namespace :bundle do
128
+ task :install do
129
+ sh "bundle install"
130
+ end
131
+ end
132
+
133
+ task :default => ["bundle:install", "clobber:app", "generate:app", "generate:stuff", :spec, :cucumber, :smoke]
128
134
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0.beta.6
1
+ 2.0.0.beta.7
@@ -1,3 +1,5 @@
1
+ require 'active_support/core_ext/class/attribute_accessors'
2
+ require 'action_controller'
1
3
  require 'action_dispatch'
2
4
  require 'webrat'
3
5
 
@@ -10,11 +10,11 @@ module ViewExampleGroupBehaviour
10
10
 
11
11
  module ViewExtension
12
12
  def protect_against_forgery?; end
13
- def method_missing(selector, *args)
14
- if Rails.application.routes.named_routes.helpers.include?(selector)
15
- controller.__send__(selector, *args)
13
+ def method_missing(name, *args)
14
+ if controller.respond_to?(name) || Rails.application.routes.named_routes.helpers.include?(name)
15
+ controller.__send__(name, *args)
16
16
  else
17
- super
17
+ super(name, *args)
18
18
  end
19
19
  end
20
20
  end
@@ -11,6 +11,12 @@ rescue LoadError
11
11
  end
12
12
  end
13
13
 
14
+ begin
15
+ require "active_record"
16
+ rescue
17
+
18
+ end
19
+
14
20
  Rspec::Matchers.define :redirect_to do |destination|
15
21
  match_unless_raises Test::Unit::AssertionFailedError do |_|
16
22
  assert_redirected_to destination
@@ -16,7 +16,7 @@ module Rspec
16
16
  :new_record? => false,
17
17
  :destroyed? => false,
18
18
  :marked_for_destruction? => false,
19
- :errors => stub("errors", :count => 0)
19
+ :errors => stub("errors", :count => 0, :any? => false)
20
20
  })
21
21
  derived_name = "#{model_class.name}_#{id}"
22
22
  m = mock(derived_name, options_and_stubs)
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rspec-rails}
8
- s.version = "2.0.0.beta.6"
8
+ s.version = "2.0.0.beta.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David Chelimsky", "Chad Humphries"]
12
- s.date = %q{2010-04-12}
12
+ s.date = %q{2010-04-17}
13
13
  s.description = %q{Rspec-2 for Rails-3}
14
14
  s.email = %q{dchelimsky@gmail.com;chad.humphries@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
17
17
  ]
18
18
  s.files = [
19
19
  ".gitignore",
20
+ "Gemfile",
20
21
  "README.markdown",
21
22
  "Rakefile",
22
23
  "VERSION",
@@ -83,7 +84,7 @@ Gem::Specification.new do |s|
83
84
  s.homepage = %q{http://github.com/rspec/rspec-rails}
84
85
  s.post_install_message = %q{**************************************************
85
86
 
86
- Thank you for installing rspec-rails-2.0.0.beta.6!
87
+ Thank you for installing rspec-rails-2.0.0.beta.7!
87
88
 
88
89
  This version of rspec-rails only works with
89
90
  versions of rails >= 3.0.0.pre.
@@ -98,7 +99,7 @@ Gem::Specification.new do |s|
98
99
  s.require_paths = ["lib"]
99
100
  s.rubyforge_project = %q{rspec}
100
101
  s.rubygems_version = %q{1.3.6}
101
- s.summary = %q{rspec-rails-2.0.0.beta.6}
102
+ s.summary = %q{rspec-rails-2.0.0.beta.7}
102
103
  s.test_files = [
103
104
  "spec/rspec/rails/matchers/be_a_new_spec.rb",
104
105
  "spec/rspec/rails/matchers/redirect_to_spec.rb",
@@ -115,14 +116,14 @@ Gem::Specification.new do |s|
115
116
  s.specification_version = 3
116
117
 
117
118
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
118
- s.add_runtime_dependency(%q<rspec>, ["= 2.0.0.beta.6"])
119
+ s.add_runtime_dependency(%q<rspec>, ["= 2.0.0.beta.7"])
119
120
  s.add_runtime_dependency(%q<webrat>, [">= 0.7.0"])
120
121
  else
121
- s.add_dependency(%q<rspec>, ["= 2.0.0.beta.6"])
122
+ s.add_dependency(%q<rspec>, ["= 2.0.0.beta.7"])
122
123
  s.add_dependency(%q<webrat>, [">= 0.7.0"])
123
124
  end
124
125
  else
125
- s.add_dependency(%q<rspec>, ["= 2.0.0.beta.6"])
126
+ s.add_dependency(%q<rspec>, ["= 2.0.0.beta.7"])
126
127
  s.add_dependency(%q<webrat>, [">= 0.7.0"])
127
128
  end
128
129
  end
@@ -1,16 +1,6 @@
1
- %w(actionmailer actionpack activemodel activerecord activeresource activesupport railties).each do |directory|
2
- $LOAD_PATH.unshift File.expand_path( File.join(File.dirname(__FILE__), "..", "tmp", "rails", directory, "lib") )
3
- end
1
+ require 'bundler'
2
+ Bundler.setup
4
3
 
5
- require 'i18n'
6
- require 'rack'
7
- require 'rack/mock'
8
- require 'rack/mime'
9
- require 'active_support'
10
- require 'active_support/core_ext'
11
- require 'action_dispatch'
12
- require 'action_controller'
13
- require 'active_record'
14
4
  require 'rspec/rails'
15
5
 
16
6
  def in_editor?
metadata CHANGED
@@ -7,8 +7,8 @@ version: !ruby/object:Gem::Version
7
7
  - 0
8
8
  - 0
9
9
  - beta
10
- - 6
11
- version: 2.0.0.beta.6
10
+ - 7
11
+ version: 2.0.0.beta.7
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-04-12 00:00:00 -05:00
20
+ date: 2010-04-17 00:00:00 -05: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
- - 6
36
- version: 2.0.0.beta.6
35
+ - 7
36
+ version: 2.0.0.beta.7
37
37
  type: :runtime
38
38
  version_requirements: *id001
39
39
  - !ruby/object:Gem::Dependency
@@ -60,6 +60,7 @@ extra_rdoc_files:
60
60
  - README.markdown
61
61
  files:
62
62
  - .gitignore
63
+ - Gemfile
63
64
  - README.markdown
64
65
  - Rakefile
65
66
  - VERSION
@@ -129,7 +130,7 @@ licenses: []
129
130
  post_install_message: |
130
131
  **************************************************
131
132
 
132
- Thank you for installing rspec-rails-2.0.0.beta.6!
133
+ Thank you for installing rspec-rails-2.0.0.beta.7!
133
134
 
134
135
  This version of rspec-rails only works with
135
136
  versions of rails >= 3.0.0.pre.
@@ -166,7 +167,7 @@ rubyforge_project: rspec
166
167
  rubygems_version: 1.3.6
167
168
  signing_key:
168
169
  specification_version: 3
169
- summary: rspec-rails-2.0.0.beta.6
170
+ summary: rspec-rails-2.0.0.beta.7
170
171
  test_files:
171
172
  - spec/rspec/rails/matchers/be_a_new_spec.rb
172
173
  - spec/rspec/rails/matchers/redirect_to_spec.rb