cucumber_factory 1.11.4 → 1.11.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +1 -0
- data/.ruby-version +1 -1
- data/.travis.yml +42 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +1 -0
- data/{MIT-LICENSE → LICENSE} +1 -1
- data/README.md +158 -0
- data/Rakefile +5 -57
- data/cucumber_factory.gemspec +2 -1
- data/gemfiles/Gemfile.cucumber-1.3 +17 -0
- data/gemfiles/Gemfile.cucumber-1.3.lock +53 -0
- data/gemfiles/Gemfile.cucumber-2.4 +16 -0
- data/gemfiles/Gemfile.cucumber-2.4.lock +84 -0
- data/gemfiles/Gemfile.cucumber-3.0 +16 -0
- data/gemfiles/Gemfile.cucumber-3.0.lock +79 -0
- data/lib/cucumber/factory.rb +13 -4
- data/lib/cucumber_factory.rb +5 -0
- data/lib/cucumber_factory/switcher.rb +9 -3
- data/lib/cucumber_factory/version.rb +1 -1
- data/spec/{shared/cucumber_factory → cucumber_factory}/factory/build_strategy_spec.rb +0 -1
- data/spec/{shared/cucumber_factory → cucumber_factory}/steps_spec.rb +20 -4
- data/spec/spec_helper.rb +12 -0
- data/spec/support/cucumber_helper.rb +35 -0
- data/spec/support/database.rb +30 -0
- data/spec/support/database.sample.yml +5 -0
- data/spec/support/database.travis.yml +4 -0
- data/spec/support/database.yml +5 -0
- data/spec/{shared/support → support}/factory_girl_mock.rb +0 -0
- data/spec/{shared/app_root/app → support}/models/job_offer.rb +0 -0
- data/spec/{shared/app_root/app → support}/models/machinist_model.rb +0 -0
- data/spec/{shared/app_root/app → support}/models/movie.rb +0 -0
- data/spec/{shared/app_root/app → support}/models/opera.rb +0 -0
- data/spec/{shared/app_root/app → support}/models/payment.rb +0 -0
- data/spec/support/models/people/actor.rb +4 -0
- data/spec/{shared/app_root/app → support}/models/plain_ruby_class.rb +0 -0
- data/spec/{shared/app_root/app → support}/models/user.rb +0 -0
- metadata +59 -117
- data/README.rdoc +0 -103
- data/spec/app_root/log/.keep +0 -0
- data/spec/rails-2.3/Gemfile +0 -10
- data/spec/rails-2.3/Gemfile.lock +0 -70
- data/spec/rails-2.3/Rakefile +0 -11
- data/spec/rails-2.3/app_root/config/boot.rb +0 -129
- data/spec/rails-2.3/app_root/config/database.yml +0 -4
- data/spec/rails-2.3/app_root/config/environment.rb +0 -7
- data/spec/rails-2.3/app_root/config/environments/test.rb +0 -28
- data/spec/rails-2.3/app_root/config/preinitializer.rb +0 -20
- data/spec/rails-2.3/app_root/config/routes.rb +0 -4
- data/spec/rails-2.3/app_root/log/.gitignore +0 -1
- data/spec/rails-2.3/rcov.opts +0 -2
- data/spec/rails-2.3/spec.opts +0 -4
- data/spec/rails-2.3/spec/spec_helper.rb +0 -28
- data/spec/rails-3.0/.rspec +0 -2
- data/spec/rails-3.0/Gemfile +0 -9
- data/spec/rails-3.0/Gemfile.lock +0 -126
- data/spec/rails-3.0/Rakefile +0 -10
- data/spec/rails-3.0/app_root/.gitignore +0 -4
- data/spec/rails-3.0/app_root/config/application.rb +0 -32
- data/spec/rails-3.0/app_root/config/boot.rb +0 -13
- data/spec/rails-3.0/app_root/config/database.yml +0 -4
- data/spec/rails-3.0/app_root/config/environment.rb +0 -5
- data/spec/rails-3.0/app_root/config/environments/test.rb +0 -35
- data/spec/rails-3.0/app_root/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/rails-3.0/app_root/config/initializers/inflections.rb +0 -10
- data/spec/rails-3.0/app_root/config/initializers/mime_types.rb +0 -5
- data/spec/rails-3.0/app_root/config/initializers/secret_token.rb +0 -7
- data/spec/rails-3.0/app_root/config/initializers/session_store.rb +0 -8
- data/spec/rails-3.0/app_root/config/routes.rb +0 -3
- data/spec/rails-3.0/app_root/log/.gitkeep +0 -0
- data/spec/rails-3.0/rcov.opts +0 -2
- data/spec/rails-3.0/spec/spec_helper.rb +0 -25
- data/spec/rails-3.2/.rspec +0 -2
- data/spec/rails-3.2/Gemfile +0 -9
- data/spec/rails-3.2/Gemfile.lock +0 -136
- data/spec/rails-3.2/Rakefile +0 -10
- data/spec/rails-3.2/app_root/.gitignore +0 -4
- data/spec/rails-3.2/app_root/config/application.rb +0 -32
- data/spec/rails-3.2/app_root/config/boot.rb +0 -13
- data/spec/rails-3.2/app_root/config/database.yml +0 -4
- data/spec/rails-3.2/app_root/config/environment.rb +0 -5
- data/spec/rails-3.2/app_root/config/environments/test.rb +0 -35
- data/spec/rails-3.2/app_root/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/rails-3.2/app_root/config/initializers/inflections.rb +0 -10
- data/spec/rails-3.2/app_root/config/initializers/mime_types.rb +0 -5
- data/spec/rails-3.2/app_root/config/initializers/secret_token.rb +0 -7
- data/spec/rails-3.2/app_root/config/initializers/session_store.rb +0 -8
- data/spec/rails-3.2/app_root/config/routes.rb +0 -3
- data/spec/rails-3.2/app_root/log/.gitkeep +0 -0
- data/spec/rails-3.2/rcov.opts +0 -2
- data/spec/rails-3.2/spec/spec_helper.rb +0 -25
- data/spec/rails-4.0/.rspec +0 -2
- data/spec/rails-4.0/Gemfile +0 -9
- data/spec/rails-4.0/Gemfile.lock +0 -114
- data/spec/rails-4.0/Rakefile +0 -10
- data/spec/rails-4.0/app_root/.gitignore +0 -4
- data/spec/rails-4.0/app_root/config/application.rb +0 -31
- data/spec/rails-4.0/app_root/config/boot.rb +0 -13
- data/spec/rails-4.0/app_root/config/database.yml +0 -4
- data/spec/rails-4.0/app_root/config/environment.rb +0 -5
- data/spec/rails-4.0/app_root/config/environments/test.rb +0 -34
- data/spec/rails-4.0/app_root/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/rails-4.0/app_root/config/initializers/inflections.rb +0 -10
- data/spec/rails-4.0/app_root/config/initializers/mime_types.rb +0 -5
- data/spec/rails-4.0/app_root/config/initializers/secret_token.rb +0 -7
- data/spec/rails-4.0/app_root/config/initializers/session_store.rb +0 -8
- data/spec/rails-4.0/app_root/config/locales/en.yml +0 -4
- data/spec/rails-4.0/app_root/config/routes.rb +0 -3
- data/spec/rails-4.0/app_root/log/.gitkeep +0 -0
- data/spec/rails-4.0/rcov.opts +0 -2
- data/spec/rails-4.0/spec/spec_helper.rb +0 -25
- data/spec/shared/app_root/app/controllers/application_controller.rb +0 -2
- data/spec/shared/app_root/app/models/people/actor.rb +0 -2
- data/spec/shared/app_root/config/locales/en.yml +0 -4
- data/spec/shared/app_root/db/migrate/001_create_movies.rb +0 -17
- data/spec/shared/app_root/db/migrate/002_create_users.rb +0 -20
- data/spec/shared/app_root/db/migrate/003_create_payments.rb +0 -14
- data/spec/shared/app_root/db/migrate/004_create_actors.rb +0 -12
- data/spec/shared/cucumber_factory/cucumber_helper.rb +0 -15
- data/spec/shared/cucumber_factory/runtime_ext_spec.rb +0 -33
data/README.rdoc
DELETED
@@ -1,103 +0,0 @@
|
|
1
|
-
= Cucumber Factory - create ActiveRecord objects without step definitions
|
2
|
-
|
3
|
-
Cucumber Factory allows you to create ActiveRecord objects directly from your {Cucumber}[http://cukes.info/] features. No step definitions required.
|
4
|
-
|
5
|
-
|
6
|
-
== Examples
|
7
|
-
|
8
|
-
The following will call {Movie.make}[http://github.com/notahat/machinist], {Factory.create(:movie)}[http://github.com/thoughtbot/factory_girl], Movie.create! or Movie.new, depending on what's available:
|
9
|
-
|
10
|
-
Given there is a movie
|
11
|
-
|
12
|
-
To create a new record with attributes set, you can say:
|
13
|
-
|
14
|
-
Given there is a movie with the title "Sunshine" and the year "2007"
|
15
|
-
|
16
|
-
Boolean attributes can be set by appending "which", "that" or "who" at the end:
|
17
|
-
|
18
|
-
Given there is a movie which is awesome
|
19
|
-
And there is a movie with the name "Sunshine" that is not a comedy
|
20
|
-
And there is a director who is popular
|
21
|
-
|
22
|
-
Instead of "and" you can also use "but" and commas to join sentences:
|
23
|
-
|
24
|
-
Given there is a movie which is awesome, popular and successful but not science fiction
|
25
|
-
And there is a director with the income "500000" but with the account balance "-30000"
|
26
|
-
|
27
|
-
|
28
|
-
== Setting associations
|
29
|
-
|
30
|
-
You can set <tt>belongs_to</tt> associations by referring to the last created record of a kind by saying "above":
|
31
|
-
|
32
|
-
Given there is a movie with the title "Before Sunrise"
|
33
|
-
And there is a movie with the prequel above
|
34
|
-
|
35
|
-
The example above also shows how to set <tt>has_many</tt> associations - you simply set the <tt>belongs_to</tt> association on the other side.
|
36
|
-
|
37
|
-
You can also set associations by referring to any string attribute used previously:
|
38
|
-
|
39
|
-
Given there is a movie with the title "Before Sunrise"
|
40
|
-
And there is a movie with the title "Limitless"
|
41
|
-
And there is a movie with the prequel "Before Sunrise"
|
42
|
-
|
43
|
-
You can also explicitly give a record a name and use it to set a <tt>belongs_to</tt> association below:
|
44
|
-
|
45
|
-
Given "Before Sunrise" is a movie
|
46
|
-
And there is a movie with the title "Limitless"
|
47
|
-
And there is a movie with the prequel "Before Sunrise"
|
48
|
-
|
49
|
-
Note that in the example above, "Before Sunrise" is only a name you can use to refer to the record. The name is not actually used for the movie title, or any other attribute value.
|
50
|
-
|
51
|
-
|
52
|
-
== Fixture factory support
|
53
|
-
|
54
|
-
{Machinist blueprints}[http://github.com/notahat/machinist] and {factory_girl factories}[http://github.com/thoughtbot/factory_girl] will be used when available.
|
55
|
-
|
56
|
-
You can use a {FactoryGirl child factory}[https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md#inheritance] or {Machinist named blueprint}[https://github.com/notahat/machinist/tree/1.0-maintenance#named-blueprints] by putting the variant name in parentheses:
|
57
|
-
|
58
|
-
Given there is a movie (comedy) with the title "Groundhog Day"
|
59
|
-
|
60
|
-
You can use {FactoryGirl traits}[https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md#traits] by putting the traits in parentheses, as a comma-separated list:
|
61
|
-
|
62
|
-
Given there is a movie (moody, dark) with the title "Interstellar"
|
63
|
-
|
64
|
-
|
65
|
-
== Overriding factory steps
|
66
|
-
|
67
|
-
If you want to override a factory step with your own version, just do so:
|
68
|
-
|
69
|
-
Given /^there is a movie with good actors$/ do
|
70
|
-
movie = Movie.make
|
71
|
-
movie.actors << Actor.make(:name => 'Clive Owen')
|
72
|
-
movie.actors << Actor.make(:name => 'Denzel Washington')
|
73
|
-
end
|
74
|
-
|
75
|
-
Custom steps will always be preferred over factory steps. Also Cucumber will not raise a warning about ambiguous steps if the only other matching step is a factory step.
|
76
|
-
|
77
|
-
|
78
|
-
== Installation and setup
|
79
|
-
|
80
|
-
Cucumber Factory is a gem, which you can install with
|
81
|
-
|
82
|
-
sudo gem install cucumber_factory
|
83
|
-
|
84
|
-
In Rails 2, add the following to your <tt>environment.rb</tt>:
|
85
|
-
|
86
|
-
config.gem 'cucumber_factory'
|
87
|
-
|
88
|
-
In Rails 3+, add the following to your <tt>Gemfile</tt>:
|
89
|
-
|
90
|
-
gem 'cucumber_factory'
|
91
|
-
|
92
|
-
Finally, create a file <tt>features/step_definitions/factory_steps.rb</tt>, which just says
|
93
|
-
|
94
|
-
Cucumber::Factory.add_steps(self)
|
95
|
-
|
96
|
-
|
97
|
-
=== Credits
|
98
|
-
|
99
|
-
Henning Koch
|
100
|
-
|
101
|
-
{makandra.com}[http://makandra.com/]
|
102
|
-
|
103
|
-
{gem-session.com}[http://gem-session.com/]
|
data/spec/app_root/log/.keep
DELETED
File without changes
|
data/spec/rails-2.3/Gemfile
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
source 'http://rubygems.org'
|
2
|
-
|
3
|
-
gem 'sqlite3'
|
4
|
-
gem 'test-unit', '=1.2.3', :platforms => :ruby_19
|
5
|
-
gem 'hoe', '=2.8.0', :platforms => :ruby_19
|
6
|
-
gem 'rails', '~>2.3.10'
|
7
|
-
gem 'rspec', '<2'
|
8
|
-
gem 'rspec-rails', '<2'
|
9
|
-
gem 'cucumber', '<2'
|
10
|
-
gem 'cucumber_factory', :path => '../..'
|
data/spec/rails-2.3/Gemfile.lock
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../..
|
3
|
-
specs:
|
4
|
-
cucumber_factory (1.11.3)
|
5
|
-
activesupport
|
6
|
-
cucumber
|
7
|
-
cucumber_priority
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: http://rubygems.org/
|
11
|
-
specs:
|
12
|
-
actionmailer (2.3.18)
|
13
|
-
actionpack (= 2.3.18)
|
14
|
-
actionpack (2.3.18)
|
15
|
-
activesupport (= 2.3.18)
|
16
|
-
rack (~> 1.1.0)
|
17
|
-
activerecord (2.3.18)
|
18
|
-
activesupport (= 2.3.18)
|
19
|
-
activeresource (2.3.18)
|
20
|
-
activesupport (= 2.3.18)
|
21
|
-
activesupport (2.3.18)
|
22
|
-
builder (3.2.2)
|
23
|
-
cucumber (1.3.20)
|
24
|
-
builder (>= 2.1.2)
|
25
|
-
diff-lcs (>= 1.1.3)
|
26
|
-
gherkin (~> 2.12)
|
27
|
-
multi_json (>= 1.7.5, < 2.0)
|
28
|
-
multi_test (>= 0.1.2)
|
29
|
-
cucumber_priority (0.1.0)
|
30
|
-
activesupport
|
31
|
-
cucumber
|
32
|
-
diff-lcs (1.2.5)
|
33
|
-
gherkin (2.12.2)
|
34
|
-
multi_json (~> 1.3)
|
35
|
-
hoe (2.8.0)
|
36
|
-
rake (>= 0.8.7)
|
37
|
-
multi_json (1.11.2)
|
38
|
-
multi_test (0.1.2)
|
39
|
-
rack (1.1.6)
|
40
|
-
rails (2.3.18)
|
41
|
-
actionmailer (= 2.3.18)
|
42
|
-
actionpack (= 2.3.18)
|
43
|
-
activerecord (= 2.3.18)
|
44
|
-
activeresource (= 2.3.18)
|
45
|
-
activesupport (= 2.3.18)
|
46
|
-
rake (>= 0.8.3)
|
47
|
-
rake (10.4.2)
|
48
|
-
rspec (1.3.2)
|
49
|
-
rspec-rails (1.3.4)
|
50
|
-
rack (>= 1.0.0)
|
51
|
-
rspec (~> 1.3.1)
|
52
|
-
sqlite3 (1.3.11)
|
53
|
-
test-unit (1.2.3)
|
54
|
-
hoe (>= 1.5.1)
|
55
|
-
|
56
|
-
PLATFORMS
|
57
|
-
ruby
|
58
|
-
|
59
|
-
DEPENDENCIES
|
60
|
-
cucumber (< 2)
|
61
|
-
cucumber_factory!
|
62
|
-
hoe (= 2.8.0)
|
63
|
-
rails (~> 2.3.10)
|
64
|
-
rspec (< 2)
|
65
|
-
rspec-rails (< 2)
|
66
|
-
sqlite3
|
67
|
-
test-unit (= 1.2.3)
|
68
|
-
|
69
|
-
BUNDLED WITH
|
70
|
-
1.10.6
|
data/spec/rails-2.3/Rakefile
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
require 'rake'
|
2
|
-
require 'spec/rake/spectask'
|
3
|
-
|
4
|
-
desc 'Default: Run all specs for a specific rails version.'
|
5
|
-
task :default => :spec
|
6
|
-
|
7
|
-
desc "Run all specs for a specific rails version"
|
8
|
-
Spec::Rake::SpecTask.new() do |t|
|
9
|
-
t.spec_opts = ['--options', "\"spec.opts\""]
|
10
|
-
t.spec_files = defined?(SPEC) ? SPEC : FileList['**/*_spec.rb', '../shared/**/*_spec.rb']
|
11
|
-
end
|
@@ -1,129 +0,0 @@
|
|
1
|
-
# Allow customization of the rails framework path
|
2
|
-
RAILS_FRAMEWORK_ROOT = (ENV['RAILS_FRAMEWORK_ROOT'] || "#{File.dirname(__FILE__)}/../../../../../../vendor/rails") unless defined?(RAILS_FRAMEWORK_ROOT)
|
3
|
-
|
4
|
-
# Don't change this file!
|
5
|
-
# Configure your app in config/environment.rb and config/environments/*.rb
|
6
|
-
|
7
|
-
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
|
8
|
-
|
9
|
-
module Rails
|
10
|
-
class << self
|
11
|
-
def boot!
|
12
|
-
unless booted?
|
13
|
-
preinitialize
|
14
|
-
pick_boot.run
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def booted?
|
19
|
-
defined? Rails::Initializer
|
20
|
-
end
|
21
|
-
|
22
|
-
def pick_boot
|
23
|
-
(vendor_rails? ? VendorBoot : GemBoot).new
|
24
|
-
end
|
25
|
-
|
26
|
-
def vendor_rails?
|
27
|
-
File.exist?(RAILS_FRAMEWORK_ROOT)
|
28
|
-
end
|
29
|
-
|
30
|
-
def preinitialize
|
31
|
-
load(preinitializer_path) if File.exist?(preinitializer_path)
|
32
|
-
end
|
33
|
-
|
34
|
-
def preinitializer_path
|
35
|
-
"#{RAILS_ROOT}/config/preinitializer.rb"
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
class Boot
|
40
|
-
def run
|
41
|
-
load_initializer
|
42
|
-
Rails::Initializer.run(:set_load_path)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
class VendorBoot < Boot
|
47
|
-
def load_initializer
|
48
|
-
require "#{RAILS_FRAMEWORK_ROOT}/railties/lib/initializer"
|
49
|
-
Rails::Initializer.run(:install_gem_spec_stubs)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
class GemBoot < Boot
|
54
|
-
def load_initializer
|
55
|
-
self.class.load_rubygems
|
56
|
-
load_rails_gem
|
57
|
-
require 'initializer'
|
58
|
-
end
|
59
|
-
|
60
|
-
def load_rails_gem
|
61
|
-
if version = self.class.gem_version
|
62
|
-
gem 'rails', version
|
63
|
-
else
|
64
|
-
gem 'rails'
|
65
|
-
end
|
66
|
-
rescue Gem::LoadError => load_error
|
67
|
-
$stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
|
68
|
-
exit 1
|
69
|
-
end
|
70
|
-
|
71
|
-
class << self
|
72
|
-
def rubygems_version
|
73
|
-
Gem::RubyGemsVersion rescue nil
|
74
|
-
end
|
75
|
-
|
76
|
-
def gem_version
|
77
|
-
if defined? RAILS_GEM_VERSION
|
78
|
-
RAILS_GEM_VERSION
|
79
|
-
elsif ENV.include?('RAILS_GEM_VERSION')
|
80
|
-
ENV['RAILS_GEM_VERSION']
|
81
|
-
else
|
82
|
-
parse_gem_version(read_environment_rb)
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
def load_rubygems
|
87
|
-
require 'rubygems'
|
88
|
-
min_version = '1.1.1'
|
89
|
-
unless rubygems_version >= min_version
|
90
|
-
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
|
91
|
-
exit 1
|
92
|
-
end
|
93
|
-
|
94
|
-
rescue LoadError
|
95
|
-
$stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
|
96
|
-
exit 1
|
97
|
-
end
|
98
|
-
|
99
|
-
def parse_gem_version(text)
|
100
|
-
$1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
|
101
|
-
end
|
102
|
-
|
103
|
-
private
|
104
|
-
def read_environment_rb
|
105
|
-
environment_rb = "#{RAILS_ROOT}/config/environment.rb"
|
106
|
-
environment_rb = "#{HELPER_RAILS_ROOT}/config/environment.rb" unless File.exists?(environment_rb)
|
107
|
-
File.read(environment_rb)
|
108
|
-
end
|
109
|
-
end
|
110
|
-
end
|
111
|
-
end
|
112
|
-
|
113
|
-
|
114
|
-
class Rails::Boot
|
115
|
-
def run
|
116
|
-
load_initializer
|
117
|
-
|
118
|
-
Rails::Initializer.class_eval do
|
119
|
-
def load_gems
|
120
|
-
@bundler_loaded ||= Bundler.require :default, Rails.env
|
121
|
-
end
|
122
|
-
end
|
123
|
-
|
124
|
-
Rails::Initializer.run(:set_load_path)
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
# All that for this:
|
129
|
-
Rails.boot!
|
@@ -1,7 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), 'boot')
|
2
|
-
|
3
|
-
Rails::Initializer.run do |config|
|
4
|
-
config.cache_classes = false
|
5
|
-
config.whiny_nils = true
|
6
|
-
config.action_controller.session = { :key => "_myapp_session", :secret => "gwirofjweroijger8924rt2zfwehfuiwehb1378rifowenfoqwphf23" }
|
7
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# Settings specified here will take precedence over those in config/environment.rb
|
2
|
-
|
3
|
-
# The test environment is used exclusively to run your application's
|
4
|
-
# test suite. You never need to work with it otherwise. Remember that
|
5
|
-
# your test database is "scratch space" for the test suite and is wiped
|
6
|
-
# and recreated between test runs. Don't rely on the data there!
|
7
|
-
config.cache_classes = true
|
8
|
-
|
9
|
-
# Log error messages when you accidentally call methods on nil.
|
10
|
-
config.whiny_nils = true
|
11
|
-
|
12
|
-
# Show full error reports and disable caching
|
13
|
-
config.action_controller.consider_all_requests_local = true
|
14
|
-
config.action_controller.perform_caching = false
|
15
|
-
config.action_view.cache_template_loading = true
|
16
|
-
|
17
|
-
# Disable request forgery protection in test environment
|
18
|
-
config.action_controller.allow_forgery_protection = false
|
19
|
-
|
20
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
21
|
-
# The :test delivery method accumulates sent emails in the
|
22
|
-
# ActionMailer::Base.deliveries array.
|
23
|
-
config.action_mailer.delivery_method = :test
|
24
|
-
|
25
|
-
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
26
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
27
|
-
# like if you have constraints or database-specific column types
|
28
|
-
# config.active_record.schema_format = :sql
|
@@ -1,20 +0,0 @@
|
|
1
|
-
begin
|
2
|
-
require "rubygems"
|
3
|
-
require "bundler"
|
4
|
-
rescue LoadError
|
5
|
-
raise "Could not load the bundler gem. Install it with `gem install bundler`."
|
6
|
-
end
|
7
|
-
|
8
|
-
if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.24")
|
9
|
-
raise RuntimeError, "Your bundler version is too old for Rails 2.3." +
|
10
|
-
"Run `gem install bundler` to upgrade."
|
11
|
-
end
|
12
|
-
|
13
|
-
begin
|
14
|
-
# Set up load paths for all bundled gems
|
15
|
-
ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile", __FILE__)
|
16
|
-
Bundler.setup
|
17
|
-
rescue Bundler::GemNotFound
|
18
|
-
raise RuntimeError, "Bundler couldn't find some gems." +
|
19
|
-
"Did you run `bundle install`?"
|
20
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
*.log
|
data/spec/rails-2.3/rcov.opts
DELETED
data/spec/rails-2.3/spec.opts
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
$: << File.join(File.dirname(__FILE__), "/../../lib" )
|
2
|
-
|
3
|
-
ENV['RAILS_ENV'] = 'test'
|
4
|
-
ENV['RAILS_ROOT'] = 'app_root'
|
5
|
-
|
6
|
-
# Load the Rails environment and testing framework
|
7
|
-
require "#{File.dirname(__FILE__)}/../app_root/config/environment"
|
8
|
-
require 'spec/rails'
|
9
|
-
require "#{File.dirname(__FILE__)}/../../../lib/cucumber_factory"
|
10
|
-
|
11
|
-
# Load dependencies
|
12
|
-
# require 'has_defaults'
|
13
|
-
|
14
|
-
# Require support code
|
15
|
-
# Dir["../shared/support/**/*.rb"].each {|f| require f}
|
16
|
-
|
17
|
-
# Run the migrations
|
18
|
-
print "\033[30m" # dark gray text
|
19
|
-
ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")
|
20
|
-
print "\033[0m"
|
21
|
-
|
22
|
-
Spec::Runner.configure do |config|
|
23
|
-
config.use_transactional_fixtures = true
|
24
|
-
config.use_instantiated_fixtures = false
|
25
|
-
end
|
26
|
-
|
27
|
-
|
28
|
-
|
data/spec/rails-3.0/.rspec
DELETED