Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 36 lines (27 sloc) 0.988 kb
cc66eb8 Put everything in place for gemifying, but haven't tested it
Philip (flip) Kromer authored
1 require 'spork'
2 require 'rspec'
3
5b8ed93 Volumes from snapshot on instantiation works. Cleaned up the slicing …
Philip (flip) Kromer authored
4
cc66eb8 Put everything in place for gemifying, but haven't tested it
Philip (flip) Kromer authored
5 Spork.prefork do
6 # This code is run only once when the spork server is started
f8869e7 detailed (but muddy) integration specs and a complicated-enough example
Philip (flip) Kromer authored
7 CLUSTER_CHEF_DIR = File.expand_path(File.dirname(__FILE__)+'/..') unless defined?(CLUSTER_CHEF_DIR)
8 def CLUSTER_CHEF_DIR(*paths) File.join(CLUSTER_CHEF_DIR, *paths); end
cc66eb8 Put everything in place for gemifying, but haven't tested it
Philip (flip) Kromer authored
9
964bbf2 changing the way slices happen
Philip (flip) Kromer authored
10 require 'chef'
11 require 'fog'
12 require 'awesome_print'
13
f8869e7 detailed (but muddy) integration specs and a complicated-enough example
Philip (flip) Kromer authored
14 CHEF_CONFIG_FILE = File.expand_path(CLUSTER_CHEF_DIR('spec/test_config.rb')) unless defined?(CHEF_CONFIG_FILE)
15 Chef::Config.from_file(CHEF_CONFIG_FILE)
964bbf2 changing the way slices happen
Philip (flip) Kromer authored
16
cc66eb8 Put everything in place for gemifying, but haven't tested it
Philip (flip) Kromer authored
17 # Requires custom matchers & macros, etc from files in ./support/ & subdirs
de78918 adding specs
Philip (flip) Kromer authored
18 Dir[CLUSTER_CHEF_DIR("spec/support/**/*.rb")].each {|f| require f}
cc66eb8 Put everything in place for gemifying, but haven't tested it
Philip (flip) Kromer authored
19
5b8ed93 Volumes from snapshot on instantiation works. Cleaned up the slicing …
Philip (flip) Kromer authored
20 def load_example_cluster(name)
21 require(CLUSTER_CHEF_DIR('clusters', "#{name}.rb"))
22 end
23 def get_example_cluster name
24 load_example_cluster(name)
25 ClusterChef.cluster(name)
26 end
27
cc66eb8 Put everything in place for gemifying, but haven't tested it
Philip (flip) Kromer authored
28 # Configure rspec
29 RSpec.configure do |config|
30 end
31 end
32
33 Spork.each_run do
34 # This code will be run each time you run your specs.
35 end
Something went wrong with that request. Please try again.