-
Notifications
You must be signed in to change notification settings - Fork 2
/
helpers.diff
127 lines (127 loc) · 5.62 KB
/
helpers.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
Only in /Users/aiwilliams/Workspaces/faithfulcode/scenarios/: .git
Only in scenarios/: .svn
Only in scenarios/: .tm_last_run_ruby
diff -r scenarios/Rakefile /Users/aiwilliams/Workspaces/faithfulcode/scenarios/Rakefile
3c3
< TESTING_ENVIRONMENTS["rspec_3317_rails_8956"].load
---
> TESTING_ENVIRONMENTS["rspec_3119_rails_8375"].load
Only in /Users/aiwilliams/Workspaces/faithfulcode/scenarios/: helpers.diff
Only in scenarios/lib: .svn
Only in scenarios/lib/scenarios: .svn
diff -r scenarios/lib/scenarios/base.rb /Users/aiwilliams/Workspaces/faithfulcode/scenarios/lib/scenarios/base.rb
11,14c11,12
< # be included into the scenario and all specs that include the scenario.
< # You may also provide names of helpers from your scenarios/helpers
< # directory, or any other module you'd like included in your Scenario.
< def helpers(helper_names_or_modules = [], &block)
---
> # be included into the scenario and all specs that include the scenario
> def helpers(&block)
17,19d14
< mod.module_eval do
< [helper_names_or_modules].flatten.each {|h| include h.is_a?(Module) ? h : h.to_scenario_helper}
< end
Only in scenarios/lib/scenarios/builtin: .svn
Only in scenarios/lib/scenarios/extensions: .svn
diff -r scenarios/lib/scenarios/extensions/string.rb /Users/aiwilliams/Workspaces/faithfulcode/scenarios/lib/scenarios/extensions/string.rb
22,39d21
< # Convert a string into the associated scenario helper module:
< #
< # "basic".to_scenario_helper #=> BasicScenarioHelper
< # "basic_scenario".to_scenario_helper #=> BasicScenarioHelper
< #
< # Raises Scenario::NameError if the the helper cannot be loacated as
< # 'helpers/<name>_helper' in Scenario.load_paths.
< def to_scenario_helper
< class_name = "#{self.strip.camelize.sub(/ScenarioHelper$/, '')}ScenarioHelper"
< Scenario.load_paths.each do |path|
< filename = "#{path}/#{class_name.underscore}.rb"
< if File.file?(filename)
< require filename
< break
< end
< end
< class_name.constantize rescue raise Scenario::NameError, "Expected to find #{class_name} in #{Scenario.load_paths.inspect}"
< end
diff -r scenarios/lib/scenarios/extensions/symbol.rb /Users/aiwilliams/Workspaces/faithfulcode/scenarios/lib/scenarios/extensions/symbol.rb
14,23d13
< # Convert a symbol into the associated scenario helper module:
< #
< # :basic.to_scenario_helper #=> BasicScenarioHelper
< # :basic_scenario.to_scenario_helper #=> BasicScenarioHelper
< #
< # Raises Scenario::NameError if the the helper cannot be loacated as
< # 'helpers/<name>_helper' in Scenario.load_paths.
< def to_scenario_helper
< to_s.to_scenario_helper
< end
Only in scenarios/spec: .svn
Only in scenarios/spec: environments.rb
Only in scenarios/spec/scenarios: .svn
Only in scenarios/spec/scenarios: helpers
diff -r scenarios/spec/scenarios_spec.rb /Users/aiwilliams/Workspaces/faithfulcode/scenarios/spec/scenarios_spec.rb
23,27d22
< it 'should allow us to have helpers in scenarios/helpers directory which we can get through the helpers class method' do
< klass = :empty.to_scenario
< klass.helpers :myown
< end
<
diff -r scenarios/spec/spec_helper.rb /Users/aiwilliams/Workspaces/faithfulcode/scenarios/spec/spec_helper.rb
1,20c1,6
< $LOAD_PATH << File.dirname(__FILE__) + '/../testing'
<
< require File.dirname(__FILE__) + "/environments"
<
< require 'active_support'
< require 'active_record'
< require 'action_controller'
< require 'action_view'
<
< module Spec
< module Rails
< module Example
< end
< end
< end
<
< require 'spec/rails'
< require 'scenarios'
<
< require 'models'
\ No newline at end of file
---
> require File.expand_path(File.dirname(__FILE__) + "/../testing/environment")
> TESTING_ENVIRONMENTS[TESTING_ENVIRONMENT].load(DATABASE_ADAPTER)
> require "models"
> require "spec"
> require "spec/rails"
> require "scenarios"
Only in scenarios/tasks: .svn
Only in scenarios/test: .svn
Only in scenarios/testing: .svn
diff -r scenarios/testing/environment.rb /Users/aiwilliams/Workspaces/faithfulcode/scenarios/testing/environment.rb
15c15
< TESTING_ENVIRONMENT = "rspec_3317_rails_8956" unless defined?(TESTING_ENVIRONMENT)
---
> TESTING_ENVIRONMENT = "rspec_3119_rails_8375" unless defined?(TESTING_ENVIRONMENT)
31c31
< # system "cd #{lib.support_directory} && patch -p0 < #{File.join(TESTING_ROOT, "rspec_on_rails_3119.patch")}"
---
> system "cd #{lib.support_directory} && patch -p0 < #{File.join(TESTING_ROOT, "rspec_on_rails_3119.patch")}"
36,38c36,38
< TESTING_ENVIRONMENTS << TestingLibrary::Environment.new("rspec_3317_rails_8956", SUPPORT_TEMP, DB_CONFIG_FILE, DB_SCHEMA_FILE) do |env|
< env.package "rails", "http://svn.rubyonrails.org/rails", "trunk", "8956", &rails_package
< env.package "rspec", "http://rspec.rubyforge.org/svn", "trunk", "3317", &rspec_package
---
> TESTING_ENVIRONMENTS << TestingLibrary::Environment.new("rspec_3119_rails_8375", SUPPORT_TEMP, DB_CONFIG_FILE, DB_SCHEMA_FILE) do |env|
> env.package "rails", "http://svn.rubyonrails.org/rails", "trunk", "8375", &rails_package
> env.package "rspec", "http://rspec.rubyforge.org/svn", "trunk", "3119", &rspec_package
40c40
< TESTING_ENVIRONMENTS << TestingLibrary::Environment.new("rspec_3317_rails_1_2_6", SUPPORT_TEMP, DB_CONFIG_FILE, DB_SCHEMA_FILE) do |env|
---
> TESTING_ENVIRONMENTS << TestingLibrary::Environment.new("rspec_3119_rails_1_2_6", SUPPORT_TEMP, DB_CONFIG_FILE, DB_SCHEMA_FILE) do |env|
42c42
< env.package "rspec", "http://rspec.rubyforge.org/svn", "trunk", "3317", &rspec_package
---
> env.package "rspec", "http://rspec.rubyforge.org/svn", "trunk", "3119", &rspec_package