rspec_generator 0.5.10 → 0.5.11

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.
@@ -0,0 +1,36 @@
1
+ # Adds the same helper methods as Rails' test_help.rb
2
+ # This file must be required from test_helper.rb
3
+ # before running test2spec over Rails tests.
4
+ #
5
+ # Replace the following line in your test/test_helper.rb
6
+ # require 'test_help'
7
+ # with
8
+ # require 'test2spec_help'
9
+ # and then translate your tests:
10
+ # test2spec --specdir spec/models test/unit
11
+ # test2spec --specdir spec/controllers test/functional
12
+ class Test::Unit::TestCase
13
+ def self.fixture_path=(p)
14
+ end
15
+
16
+ def self.use_transactional_fixtures=(f)
17
+ end
18
+
19
+ def self.fixture_table_names=(*args)
20
+ end
21
+
22
+ def self.fixture_class_names=(*args)
23
+ end
24
+
25
+ def self.use_transactional_fixtures=(*args)
26
+ end
27
+
28
+ def self.use_instantiated_fixtures=(*args)
29
+ end
30
+
31
+ def self.pre_loaded_fixtures=(*args)
32
+ end
33
+
34
+ def self.fixtures(*table_names)
35
+ end
36
+ end
data/rspec_generator.rb CHANGED
@@ -10,6 +10,7 @@ class RspecGenerator < Rails::Generator::Base
10
10
  # The spec helper and Rake tasks
11
11
  m.directory 'spec'
12
12
  m.template 'spec_helper.rb', 'spec/spec_helper.rb'
13
+ m.file 'test2spec.erb', 'spec/test2spec.erb'
13
14
  m.template 'rspec.rake', 'lib/tasks/rspec.rake'
14
15
 
15
16
  # Copy out the rspec_model generator
data/templates/rspec.rake CHANGED
@@ -32,16 +32,4 @@ namespace :spec do
32
32
  ]
33
33
  t.spec_opts = ["--format", "specdoc"]
34
34
  end
35
-
36
- namespace :translate do
37
- desc "Translate test/unit to spec/models"
38
- task :unit do
39
- `test2spec --specdir spec/models test/unit`
40
- end
41
-
42
- desc "Translate test/functional to spec/controllers"
43
- task :functional do
44
- `test2spec --specdir spec/controllers test/functional`
45
- end
46
- end
47
35
  end
@@ -0,0 +1,3 @@
1
+ require File.dirname(__FILE__) + '/<%= "../" * (depth+1) %>spec_helper.rb'
2
+
3
+ <%= translation %>
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: rspec_generator
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.5.10
7
- date: 2006-06-14 00:00:00 -05:00
6
+ version: 0.5.11
7
+ date: 2006-06-15 00:00:00 -05:00
8
8
  summary: RSpec plugin and generator for Ruby on Rails
9
9
  require_paths:
10
10
  - lib
@@ -32,10 +32,12 @@ files:
32
32
  - lib/controller_mixin.rb
33
33
  - lib/fixture_loading.rb
34
34
  - lib/rspec_on_rails.rb
35
+ - lib/test2spec_help.rb
35
36
  - templates/rspec.rake
36
37
  - templates/rspec_controller
37
38
  - templates/rspec_model
38
39
  - templates/spec_helper.rb
40
+ - templates/test2spec.erb
39
41
  - templates/rspec_controller/rspec_controller_generator.rb
40
42
  - templates/rspec_controller/templates
41
43
  - templates/rspec_controller/USAGE
@@ -67,5 +69,5 @@ dependencies:
67
69
  requirements:
68
70
  - - "="
69
71
  - !ruby/object:Gem::Version
70
- version: 0.5.10
72
+ version: 0.5.11
71
73
  version: