Skip to content

Commit f127f48

Browse files
committed
Move all tests to spec directory
1 parent 0e49002 commit f127f48

File tree

112 files changed

+9
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+9
-7
lines changed

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ task :spec do
88
require 'rspec/core/rake_task'
99
RSpec::Core::RakeTask.new(:spec) do |t|
1010
#t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
11-
t.pattern = 'test/*_spec.rb'
11+
t.pattern = 'spec/*_spec.rb'
1212
end
1313
end
1414

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/mustache_spec.rb renamed to spec/mustache_spec.rb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
require 'rubygems'
22
require 'json'
33

4-
ROOT = File.expand_path("../..", __FILE__)
4+
ROOT = File.expand_path('../..', __FILE__)
5+
SPEC = File.join(ROOT, 'spec')
6+
FILES = File.join(SPEC, '_files')
57

68
MUSTACHE = File.read(File.join(ROOT, "mustache.js"))
79

8-
TESTS = Dir.glob(File.join(ROOT, 'examples', '*.js')).map do |name|
10+
TESTS = Dir.glob(File.join(FILES, '*.js')).map do |name|
911
File.basename name, '.js'
1012
end
1113

@@ -18,14 +20,14 @@
1820
RHINO_JAR = "org.mozilla.javascript.tools.shell.Main"
1921

2022
def load_test(name, is_partial=false)
21-
view = File.read(File.join(ROOT, "examples", "#{name}.js"))
22-
template = File.read(File.join(ROOT, "examples", "#{name}.html")).to_json
23-
expect = File.read(File.join(ROOT, "examples", "#{name}.txt"))
23+
view = File.read(File.join(FILES, "#{name}.js"))
24+
template = File.read(File.join(FILES, "#{name}.html")).to_json
25+
expect = File.read(File.join(FILES, "#{name}.txt"))
2426

2527
test = [view, template, expect]
2628

2729
if is_partial
28-
test << File.read(File.join(ROOT, "examples", "#{name}.2.html")).to_json
30+
test << File.read(File.join(FILES, "#{name}.2.html")).to_json
2931
end
3032

3133
test

0 commit comments

Comments
 (0)