forked from testdouble/jasmine-rails
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBedfile
32 lines (26 loc) · 1.06 KB
/
Bedfile
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
store_in 'spec/testbeds'
testbeds do
gemfiles 'gemfiles/rails-3.2',
'gemfiles/rails-4.0',
'gemfiles/rails-4.0-jasmine-2',
'gemfiles/rails-4.1'
init do
run 'rails', 'new', name, '--skip-gemfile', '--skip-bundle'
chdir name
run 'rails', 'g', 'jasmine_rails:install'
rm "app/assets/javascripts/application.js"
cp "../../javascripts/support/jasmine.yml", "./spec/javascripts/support"
# add bootstrap code so we don't have to copy assets into each testbed
# every time a change is made
File.open("config/application.rb", "a+") do |f|
fixtures = File.expand_path('spec/fixtures', File.dirname(__FILE__))
f.puts <<-end_bootstrap
Rails.application.config.assets.paths << "#{fixtures}/app/assets/javascripts"
Rails.application.config.assets.paths << "#{fixtures}/vendor/assets/javascripts"
Rails.application.config.assets.paths << "#{fixtures}/app/assets/stylesheets"
end_bootstrap
end
end
rakefile '<%= name %>/Rakefile'
depend_on '<%= name %>/config/application.rb'
end