rspec-rails23 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
@@ -0,0 +1,44 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rspec-rails23 (0.1.0)
5
+ actionpack (~> 2.3.0)
6
+ rspec (~> 2.0.0)
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ actionpack (2.3.10)
12
+ activesupport (= 2.3.10)
13
+ rack (~> 1.1.0)
14
+ activesupport (2.3.10)
15
+ diff-lcs (1.1.2)
16
+ git (1.2.5)
17
+ jeweler (1.5.1)
18
+ bundler (~> 1.0.0)
19
+ git (>= 1.2.5)
20
+ rake
21
+ mocha (0.9.9)
22
+ rake
23
+ rack (1.1.0)
24
+ rake (0.8.7)
25
+ rspec (2.0.1)
26
+ rspec-core (~> 2.0.1)
27
+ rspec-expectations (~> 2.0.1)
28
+ rspec-mocks (~> 2.0.1)
29
+ rspec-core (2.0.1)
30
+ rspec-expectations (2.0.1)
31
+ diff-lcs (>= 1.1.2)
32
+ rspec-mocks (2.0.1)
33
+ rspec-core (~> 2.0.1)
34
+ rspec-expectations (~> 2.0.1)
35
+
36
+ PLATFORMS
37
+ ruby
38
+
39
+ DEPENDENCIES
40
+ actionpack (~> 2.3.0)
41
+ jeweler (~> 1.5.1)
42
+ mocha (= 0.9.9)
43
+ rspec (~> 2.0.0)
44
+ rspec-rails23!
data/Rakefile CHANGED
@@ -19,20 +19,20 @@ end
19
19
  require 'rspec/core/rake_task'
20
20
 
21
21
  desc "Run all specs"
22
- Rspec::Core::RakeTask.new :spec do |t|
22
+ RSpec::Core::RakeTask.new :spec do |t|
23
23
  t.pattern = "spec/**/*_spec.rb"
24
24
  end
25
25
 
26
26
  namespace :spec do
27
27
  desc "Run all specs using rcov"
28
- Rspec::Core::RakeTask.new :coverage do |t|
28
+ RSpec::Core::RakeTask.new :coverage do |t|
29
29
  t.pattern = "spec/**/*_spec.rb"
30
30
  t.rcov = true
31
31
  t.rcov_opts = %[--exclude "spec/*,gems/*,db/*,/Library/Ruby/*,config/*" --text-summary --sort coverage]
32
32
  end
33
33
  end
34
34
 
35
- task :default => [:check_dependencies, :spec]
35
+ task :default => [:spec]
36
36
 
37
37
  begin
38
38
  %w{sdoc sdoc-helpers rdiscount}.each { |name| gem name }
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -9,27 +9,27 @@ module Rspec
9
9
 
10
10
  # :behaviour => { :describes => lambda { |dt| dt < ActiveRecord::Base }
11
11
  def enable_active_record_transactional_support(filter_options={})
12
- Rspec.configuration.extend(::Rspec::Rails23::TransactionalDatabaseSupport, filter_options)
12
+ RSpec.configuration.extend(::Rspec::Rails23::TransactionalDatabaseSupport, filter_options)
13
13
  end
14
14
 
15
15
  # :behaviour => { :describes => lambda { |dt| dt.to_s.ends_with?('Helper') }
16
16
  def enable_helper_support(filter_options={})
17
- Rspec.configuration.extend(::Rspec::Rails23::Helpers, filter_options)
17
+ RSpec.configuration.extend(::Rspec::Rails23::Helpers, filter_options)
18
18
  end
19
19
 
20
20
  # :behaviour => { :describes => lambda { |dt| dt < ActionController::Base }
21
21
  def enable_controller_support(filter_options={})
22
- Rspec.configuration.extend(::Rspec::Rails23::Controllers, filter_options)
22
+ RSpec.configuration.extend(::Rspec::Rails23::Controllers, filter_options)
23
23
  end
24
24
 
25
25
  def enable_rails_specific_mocking_extensions(filter_options={})
26
- case Rspec.configuration.options[:mock_framework].to_s
26
+ case RSpec.configuration.mock_framework.to_s
27
27
  when /mocha/i
28
28
  require 'rspec/rails23/mocking/with_mocha'
29
- Rspec.configuration.include(::Rspec::Rails23::Mocking::WithMocha, filter_options)
29
+ RSpec.configuration.include(::Rspec::Rails23::Mocking::WithMocha, filter_options)
30
30
  when /rr/i
31
31
  require 'rspec/rails23/mocking/with_rr'
32
- Rspec.configuration.include(::Rspec::Rails23::Mocking::WithRR, filter_options)
32
+ RSpec.configuration.include(::Rspec::Rails23::Mocking::WithRR, filter_options)
33
33
  end
34
34
  end
35
35
 
@@ -45,4 +45,4 @@ module Rspec
45
45
  end
46
46
  end
47
47
 
48
- ::Rspec::Core::Configuration.send(:include, ::Rspec::Rails23::Configuration)
48
+ ::RSpec::Core::Configuration.send(:include, ::Rspec::Rails23::Configuration)
@@ -1,46 +1,43 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + "/../../../spec_helper")
2
2
 
3
- describe Rspec::Core::Configuration do
3
+ describe RSpec::Core::Configuration do
4
4
 
5
5
  example "loading rspec rails23 includes it in the configuration class" do
6
- Rspec::Core::Configuration.included_modules.should include(Rspec::Rails23::Configuration)
6
+ RSpec::Core::Configuration.included_modules.should include(Rspec::Rails23::Configuration)
7
7
  end
8
8
 
9
9
  it "adds a #rails method" do
10
- Rspec::Core::Configuration.new.should respond_to(:rails)
10
+ RSpec::Core::Configuration.new.should respond_to(:rails)
11
11
  end
12
12
 
13
13
  it "adds an #enable_active_record_transactional_support method" do
14
- Rspec::Core::Configuration.new.should respond_to(:enable_active_record_transactional_support)
14
+ RSpec::Core::Configuration.new.should respond_to(:enable_active_record_transactional_support)
15
15
  end
16
16
 
17
17
  describe "helpers for standard Rails23 testing support" do
18
- Rspec::Core::Configuration.class_eval do
19
- attr_reader :include_or_extend_modules
20
- end
21
18
  method_to_modules = { :enable_helper_support => Rspec::Rails23::Helpers,
22
19
  :enable_active_record_transactional_support => Rspec::Rails23::TransactionalDatabaseSupport,
23
20
  :enable_controller_support => Rspec::Rails23::Controllers
24
21
  }
25
22
  method_to_modules.each do |method, mod|
26
23
  example "##{method} with no filter options" do
27
- Rspec.configuration.send(method)
28
- Rspec.configuration.include_or_extend_modules.should include([:extend, mod, {}])
24
+ RSpec.configuration.send(method)
25
+ RSpec.configuration.include_or_extend_modules.should include([:extend, mod, {}])
29
26
  end
30
27
 
31
28
  example "##{method} with filter options" do
32
29
  filter_options = {:options => { "foo" => "bar" } }
33
- Rspec.configuration.send(method, filter_options)
34
- Rspec.configuration.include_or_extend_modules.should include([:extend, mod, filter_options])
30
+ RSpec.configuration.send(method, filter_options)
31
+ RSpec.configuration.include_or_extend_modules.should include([:extend, mod, filter_options])
35
32
  end
36
33
  end
37
34
 
38
35
  example "#enable_Rails23_specific_mocking_extensions for mocha with no filter options" do
39
- Rspec.configuration.mock_with :mocha
40
- Rspec.configuration.enable_rails_specific_mocking_extensions
41
- Rspec.configuration.include_or_extend_modules.should include([:include, Rspec::Rails23::Mocking::WithMocha, {}])
36
+ RSpec.configuration.mock_with :mocha
37
+ RSpec.configuration.enable_rails_specific_mocking_extensions
38
+ RSpec.configuration.include_or_extend_modules.should include([:include, Rspec::Rails23::Mocking::WithMocha, {}])
42
39
  end
43
40
 
44
41
  end
45
42
 
46
- end
43
+ end
@@ -7,6 +7,7 @@ require 'action_controller'
7
7
 
8
8
  gem "rspec-core", "~> 2.0.0.beta"
9
9
  require 'rspec/core'
10
+ require 'rspec/core/formatters/base_text_formatter'
10
11
  require 'rspec-rails23'
11
12
 
12
13
  gem "mocha"
@@ -29,7 +30,7 @@ def remove_last_describe_from_world
29
30
  Rspec::Core.world.example_groups.pop
30
31
  end
31
32
 
32
- class DummyFormatter < Rspec::Core::Formatters::BaseTextFormatter; end
33
+ class DummyFormatter < RSpec::Core::Formatters::BaseTextFormatter; end
33
34
 
34
35
  def dummy_reporter
35
36
  DummyFormatter.new({}, StringIO.new)
@@ -39,7 +40,7 @@ def use_color?
39
40
  !ENV.has_key?('TM_MODE')
40
41
  end
41
42
 
42
- Rspec.configure do |config|
43
+ RSpec.configure do |config|
43
44
  config.mock_with :mocha
44
45
  config.color_enabled = use_color?
45
46
  config.formatter = :documentation
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 1
7
+ - 2
8
8
  - 0
9
- version: 0.1.0
9
+ version: 0.2.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Rob Sanheim
@@ -14,13 +14,26 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-16 00:00:00 -05:00
17
+ date: 2010-11-27 00:00:00 -06:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
- name: actionpack
22
- prerelease: false
21
+ name: rspec-rails23
23
22
  requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ version: "0"
30
+ type: :runtime
31
+ prerelease: false
32
+ version_requirements: *id001
33
+ - !ruby/object:Gem::Dependency
34
+ name: actionpack
35
+ requirement: &id002 !ruby/object:Gem::Requirement
36
+ none: false
24
37
  requirements:
25
38
  - - ~>
26
39
  - !ruby/object:Gem::Version
@@ -30,11 +43,72 @@ dependencies:
30
43
  - 0
31
44
  version: 2.3.0
32
45
  type: :runtime
33
- version_requirements: *id001
46
+ prerelease: false
47
+ version_requirements: *id002
34
48
  - !ruby/object:Gem::Dependency
35
49
  name: rspec
50
+ requirement: &id003 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ~>
54
+ - !ruby/object:Gem::Version
55
+ segments:
56
+ - 2
57
+ - 0
58
+ - 0
59
+ version: 2.0.0
60
+ type: :runtime
36
61
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
62
+ version_requirements: *id003
63
+ - !ruby/object:Gem::Dependency
64
+ name: jeweler
65
+ requirement: &id004 !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ~>
69
+ - !ruby/object:Gem::Version
70
+ segments:
71
+ - 1
72
+ - 5
73
+ - 1
74
+ version: 1.5.1
75
+ type: :development
76
+ prerelease: false
77
+ version_requirements: *id004
78
+ - !ruby/object:Gem::Dependency
79
+ name: mocha
80
+ requirement: &id005 !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - "="
84
+ - !ruby/object:Gem::Version
85
+ segments:
86
+ - 0
87
+ - 9
88
+ - 9
89
+ version: 0.9.9
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: *id005
93
+ - !ruby/object:Gem::Dependency
94
+ name: actionpack
95
+ requirement: &id006 !ruby/object:Gem::Requirement
96
+ none: false
97
+ requirements:
98
+ - - ~>
99
+ - !ruby/object:Gem::Version
100
+ segments:
101
+ - 2
102
+ - 3
103
+ - 0
104
+ version: 2.3.0
105
+ type: :runtime
106
+ prerelease: false
107
+ version_requirements: *id006
108
+ - !ruby/object:Gem::Dependency
109
+ name: rspec
110
+ requirement: &id007 !ruby/object:Gem::Requirement
111
+ none: false
38
112
  requirements:
39
113
  - - "="
40
114
  - !ruby/object:Gem::Version
@@ -46,7 +120,8 @@ dependencies:
46
120
  - 8
47
121
  version: 2.0.0.beta.8
48
122
  type: :runtime
49
- version_requirements: *id002
123
+ prerelease: false
124
+ version_requirements: *id007
50
125
  description: Rails 2.3.5 Extension for Rspec 2
51
126
  email: rsanheim@gmail.com
52
127
  executables: []
@@ -58,6 +133,8 @@ extra_rdoc_files:
58
133
  - README
59
134
  files:
60
135
  - CHANGELOG
136
+ - Gemfile
137
+ - Gemfile.lock
61
138
  - LICENSE
62
139
  - README
63
140
  - RSPEC-LICENSE
@@ -81,11 +158,12 @@ homepage: http://github.com/rsanheim/rspec-rails23
81
158
  licenses: []
82
159
 
83
160
  post_install_message:
84
- rdoc_options:
85
- - --charset=UTF-8
161
+ rdoc_options: []
162
+
86
163
  require_paths:
87
164
  - lib
88
165
  required_ruby_version: !ruby/object:Gem::Requirement
166
+ none: false
89
167
  requirements:
90
168
  - - ">="
91
169
  - !ruby/object:Gem::Version
@@ -93,6 +171,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
93
171
  - 0
94
172
  version: "0"
95
173
  required_rubygems_version: !ruby/object:Gem::Requirement
174
+ none: false
96
175
  requirements:
97
176
  - - ">="
98
177
  - !ruby/object:Gem::Version
@@ -102,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
181
  requirements: []
103
182
 
104
183
  rubyforge_project:
105
- rubygems_version: 1.3.6
184
+ rubygems_version: 1.3.7
106
185
  signing_key:
107
186
  specification_version: 3
108
187
  summary: Rspec Rails for 2.3.5