shenandoah 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/.braids +8 -0
  2. data/.document +5 -0
  3. data/.gitignore +6 -0
  4. data/ChangeLog.markdown +6 -0
  5. data/LICENSE +20 -0
  6. data/LICENSE-Blue-Ridge +20 -0
  7. data/LICENSE-Screw.Unit +22 -0
  8. data/LICENSE-Smoke +22 -0
  9. data/README.markdown +260 -0
  10. data/Rakefile +70 -0
  11. data/VERSION.yml +4 -0
  12. data/lib/shenandoah/buildr.rb +9 -0
  13. data/lib/shenandoah/buildr/locator.rb +17 -0
  14. data/lib/shenandoah/buildr/shenandoah_tasks.rb +18 -0
  15. data/lib/shenandoah/buildr/test_framework.rb +28 -0
  16. data/lib/shenandoah/css/screw.css +90 -0
  17. data/lib/shenandoah/javascript/browser/runner.js +34 -0
  18. data/lib/shenandoah/javascript/common/jquery-1.3.2.js +4376 -0
  19. data/lib/shenandoah/javascript/common/jquery.fn.js +29 -0
  20. data/lib/shenandoah/javascript/common/jquery.print.js +109 -0
  21. data/lib/shenandoah/javascript/common/screw.behaviors.js +129 -0
  22. data/lib/shenandoah/javascript/common/screw.builder.js +104 -0
  23. data/lib/shenandoah/javascript/common/screw.events.js +45 -0
  24. data/lib/shenandoah/javascript/common/screw.matchers.js +254 -0
  25. data/lib/shenandoah/javascript/common/screw.mocking.js +22 -0
  26. data/lib/shenandoah/javascript/common/smoke.core.js +6 -0
  27. data/lib/shenandoah/javascript/common/smoke.mock.js +130 -0
  28. data/lib/shenandoah/javascript/common/smoke.stub.js +29 -0
  29. data/lib/shenandoah/javascript/console/consoleReportForRake.js +32 -0
  30. data/lib/shenandoah/javascript/console/env.rhino.js +8841 -0
  31. data/lib/shenandoah/javascript/console/js.jar +0 -0
  32. data/lib/shenandoah/javascript/console/runner.js +43 -0
  33. data/lib/shenandoah/javascript/console/shell.js.erb +23 -0
  34. data/lib/shenandoah/locator.rb +17 -0
  35. data/lib/shenandoah/runner.rb +69 -0
  36. data/lib/shenandoah/server.rb +88 -0
  37. data/lib/shenandoah/server/views/index.haml +12 -0
  38. data/lib/shenandoah/tasks.rb +58 -0
  39. data/shenandoah.gemspec +133 -0
  40. data/spec/shenandoah/buildr/locator_spec.rb +33 -0
  41. data/spec/shenandoah/buildr/shenandoah_tasks_spec.rb +27 -0
  42. data/spec/shenandoah/buildr/spec_helper.rb +2 -0
  43. data/spec/shenandoah/buildr/test_framework_spec.rb +77 -0
  44. data/spec/shenandoah/locator_spec.rb +74 -0
  45. data/spec/shenandoah/runner_spec.rb +110 -0
  46. data/spec/shenandoah/server_spec.rb +216 -0
  47. data/spec/shenandoah/tasks_spec.rb +76 -0
  48. data/spec/spec_helper.rb +36 -0
  49. metadata +232 -0
@@ -0,0 +1,76 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
+
3
+ require 'shenandoah/tasks'
4
+ require 'shenandoah/locator'
5
+
6
+ describe Shenandoah::Tasks do
7
+ describe "init" do
8
+ it "uses a DefaultLocator by default" do
9
+ Shenandoah::Tasks.new.locator.class.should == Shenandoah::DefaultLocator
10
+ end
11
+
12
+ it "configures the default locator with the provided options" do
13
+ Shenandoah::Tasks.new(:main_path => 'foo').locator.main_path.should == 'foo'
14
+ end
15
+ end
16
+
17
+ after do
18
+ Rake::Task.clear
19
+ end
20
+
21
+ describe "tasks" do
22
+ before do
23
+ Shenandoah::Tasks.new
24
+ end
25
+
26
+ it "adds a shen:serve task" do
27
+ Rake::Task::task_defined?('shen:serve').should be_true
28
+ end
29
+
30
+ it "adds a shen:shell task" do
31
+ Rake::Task::task_defined?('shen:shell').should be_true
32
+ end
33
+
34
+ it "adds a shen:spec task" do
35
+ Rake::Task::task_defined?('shen:spec').should be_true
36
+ end
37
+ end
38
+
39
+ describe "running" do
40
+ before do
41
+ @locator = mock(Shenandoah::DefaultLocator)
42
+ @runner = mock(Shenandoah::Runner)
43
+
44
+ @tasks = Shenandoah::Tasks.new
45
+ @tasks.locator = @locator
46
+ @tasks.runner = @runner
47
+ end
48
+
49
+ after do
50
+ ENV.delete 'SHEN_SPEC'
51
+ end
52
+
53
+ it "runs all the specs without ENV['SHEN_SPEC']" do
54
+ @locator.should_receive(:spec_files).and_return(%w(a b c))
55
+ @runner.should_receive(:run_console).with(%w(a b c)).and_return(%w(a b c))
56
+
57
+ @tasks.run_specs
58
+ end
59
+
60
+ it "only runs the specs matching ENV['SHEN_SPEC']" do
61
+ ENV['SHEN_SPEC'] = "b"
62
+
63
+ @locator.should_receive(:spec_files).and_return(%w(ab bc cd))
64
+ @runner.should_receive(:run_console).with(%w(ab bc)).and_return(%w(ab bc))
65
+
66
+ @tasks.run_specs
67
+ end
68
+
69
+ it "throws an exception on failure" do
70
+ @locator.should_receive(:spec_files).and_return(%w(a b c))
71
+ @runner.should_receive(:run_console).with(%w(a b c)).and_return(%w(a b))
72
+
73
+ lambda { @tasks.run_specs }.should raise_error(/Shenandoah specs failed!/)
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,36 @@
1
+ require 'spec'
2
+ require 'rubygems'
3
+
4
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
5
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
+
7
+ Spec::Runner.configure do |config|
8
+
9
+ end
10
+
11
+ module Shenandoah
12
+ module Spec
13
+ module Tmpfile
14
+ attr_accessor :tmpdir
15
+
16
+ def tmpfile(name, contents="contents not important")
17
+ n = "#{tmpdir}/#{name}"
18
+ FileUtils.mkdir_p File.dirname(n)
19
+ File.open(n, 'w') { |f| f.write contents }
20
+ n
21
+ end
22
+
23
+ def self.included(klass)
24
+ klass.class_eval do
25
+ before do
26
+ FileUtils.mkdir_p(self.tmpdir = File.dirname(__FILE__) + "/tmp")
27
+ end
28
+
29
+ after do
30
+ FileUtils.rm_r self.tmpdir
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
metadata ADDED
@@ -0,0 +1,232 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: shenandoah
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Rhett Sutphin
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-06-14 00:00:00 -05:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: sinatra
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.9.2
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: haml
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 2.0.9
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: rake
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: rspec
47
+ type: :development
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "="
52
+ - !ruby/object:Gem::Version
53
+ version: 1.2.4
54
+ version:
55
+ - !ruby/object:Gem::Dependency
56
+ name: rack-test
57
+ type: :development
58
+ version_requirement:
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: 0.3.0
64
+ version:
65
+ - !ruby/object:Gem::Dependency
66
+ name: rspec_hpricot_matchers
67
+ type: :development
68
+ version_requirement:
69
+ version_requirements: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: 1.0.0
74
+ version:
75
+ - !ruby/object:Gem::Dependency
76
+ name: braid
77
+ type: :development
78
+ version_requirement:
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: 0.5.0
84
+ version:
85
+ - !ruby/object:Gem::Dependency
86
+ name: rake
87
+ type: :development
88
+ version_requirement:
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - "="
92
+ - !ruby/object:Gem::Version
93
+ version: 0.8.4
94
+ version:
95
+ - !ruby/object:Gem::Dependency
96
+ name: net-ssh
97
+ type: :development
98
+ version_requirement:
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "="
102
+ - !ruby/object:Gem::Version
103
+ version: 2.0.11
104
+ version:
105
+ - !ruby/object:Gem::Dependency
106
+ name: net-sftp
107
+ type: :development
108
+ version_requirement:
109
+ version_requirements: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - "="
112
+ - !ruby/object:Gem::Version
113
+ version: 2.0.2
114
+ version:
115
+ - !ruby/object:Gem::Dependency
116
+ name: highline
117
+ type: :development
118
+ version_requirement:
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - "="
122
+ - !ruby/object:Gem::Version
123
+ version: 1.5.0
124
+ version:
125
+ - !ruby/object:Gem::Dependency
126
+ name: hoe
127
+ type: :development
128
+ version_requirement:
129
+ version_requirements: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - "="
132
+ - !ruby/object:Gem::Version
133
+ version: 1.12.2
134
+ version:
135
+ description:
136
+ email: rhett@detailedbalance.net
137
+ executables: []
138
+
139
+ extensions: []
140
+
141
+ extra_rdoc_files:
142
+ - ChangeLog.markdown
143
+ - LICENSE
144
+ - LICENSE-Blue-Ridge
145
+ - LICENSE-Screw.Unit
146
+ - LICENSE-Smoke
147
+ - README.markdown
148
+ files:
149
+ - .braids
150
+ - .document
151
+ - .gitignore
152
+ - ChangeLog.markdown
153
+ - LICENSE
154
+ - LICENSE-Blue-Ridge
155
+ - LICENSE-Screw.Unit
156
+ - LICENSE-Smoke
157
+ - README.markdown
158
+ - Rakefile
159
+ - VERSION.yml
160
+ - lib/shenandoah/buildr.rb
161
+ - lib/shenandoah/buildr/locator.rb
162
+ - lib/shenandoah/buildr/shenandoah_tasks.rb
163
+ - lib/shenandoah/buildr/test_framework.rb
164
+ - lib/shenandoah/css/screw.css
165
+ - lib/shenandoah/javascript/browser/runner.js
166
+ - lib/shenandoah/javascript/common/jquery-1.3.2.js
167
+ - lib/shenandoah/javascript/common/jquery.fn.js
168
+ - lib/shenandoah/javascript/common/jquery.print.js
169
+ - lib/shenandoah/javascript/common/screw.behaviors.js
170
+ - lib/shenandoah/javascript/common/screw.builder.js
171
+ - lib/shenandoah/javascript/common/screw.events.js
172
+ - lib/shenandoah/javascript/common/screw.matchers.js
173
+ - lib/shenandoah/javascript/common/screw.mocking.js
174
+ - lib/shenandoah/javascript/common/smoke.core.js
175
+ - lib/shenandoah/javascript/common/smoke.mock.js
176
+ - lib/shenandoah/javascript/common/smoke.stub.js
177
+ - lib/shenandoah/javascript/console/consoleReportForRake.js
178
+ - lib/shenandoah/javascript/console/env.rhino.js
179
+ - lib/shenandoah/javascript/console/js.jar
180
+ - lib/shenandoah/javascript/console/runner.js
181
+ - lib/shenandoah/javascript/console/shell.js.erb
182
+ - lib/shenandoah/locator.rb
183
+ - lib/shenandoah/runner.rb
184
+ - lib/shenandoah/server.rb
185
+ - lib/shenandoah/server/views/index.haml
186
+ - lib/shenandoah/tasks.rb
187
+ - shenandoah.gemspec
188
+ - spec/shenandoah/buildr/locator_spec.rb
189
+ - spec/shenandoah/buildr/shenandoah_tasks_spec.rb
190
+ - spec/shenandoah/buildr/spec_helper.rb
191
+ - spec/shenandoah/buildr/test_framework_spec.rb
192
+ - spec/shenandoah/locator_spec.rb
193
+ - spec/shenandoah/runner_spec.rb
194
+ - spec/shenandoah/server_spec.rb
195
+ - spec/shenandoah/tasks_spec.rb
196
+ - spec/spec_helper.rb
197
+ has_rdoc: true
198
+ homepage: http://github.com/rsutphin/shenandoah
199
+ post_install_message:
200
+ rdoc_options:
201
+ - --charset=UTF-8
202
+ require_paths:
203
+ - lib
204
+ required_ruby_version: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: "0"
209
+ version:
210
+ required_rubygems_version: !ruby/object:Gem::Requirement
211
+ requirements:
212
+ - - ">="
213
+ - !ruby/object:Gem::Version
214
+ version: "0"
215
+ version:
216
+ requirements: []
217
+
218
+ rubyforge_project: detailedbalance
219
+ rubygems_version: 1.3.1
220
+ signing_key:
221
+ specification_version: 2
222
+ summary: A javascript test framework for buildr, rails, and other ruby-built projects
223
+ test_files:
224
+ - spec/shenandoah/buildr/locator_spec.rb
225
+ - spec/shenandoah/buildr/shenandoah_tasks_spec.rb
226
+ - spec/shenandoah/buildr/spec_helper.rb
227
+ - spec/shenandoah/buildr/test_framework_spec.rb
228
+ - spec/shenandoah/locator_spec.rb
229
+ - spec/shenandoah/runner_spec.rb
230
+ - spec/shenandoah/server_spec.rb
231
+ - spec/shenandoah/tasks_spec.rb
232
+ - spec/spec_helper.rb