nelstrom / radiant-file-system-extension

Save a Radiant site to the file system for easy editing and/or version control. Load from file system back into the database

This URL has Read+Write access

nelstrom (author)
Mon Feb 09 15:25:48 -0800 2009
commit  3cd52fb1cc4381777ba8b1646cdd4de4b9c9f43c
tree    414879cf97b9fc90319c714493ede8073c7f13ba
parent  8d86d1e0763cb08cb7e55078a92a97eb5eaded83
radiant-file-system-extension / spec / spec_helper.rb
100644 37 lines (34 sloc) 1.325 kb
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
unless defined? RADIANT_ROOT
  ENV["RAILS_ENV"] = "test"
  case
  when ENV["RADIANT_ENV_FILE"]
    require ENV["RADIANT_ENV_FILE"]
  when File.dirname(__FILE__) =~ %r{vendor/radiant/vendor/extensions}
    require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../../")}/config/environment"
  else
    require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../")}/config/environment"
  end
end
require "#{RADIANT_ROOT}/spec/spec_helper"
 
if File.directory?(File.dirname(__FILE__) + "/scenarios")
  Scenario.load_paths.unshift File.dirname(__FILE__) + "/scenarios"
end
if File.directory?(File.dirname(__FILE__) + "/matchers")
  Dir[File.dirname(__FILE__) + "/matchers/*.rb"].each {|file| require file }
end
 
Spec::Runner.configure do |config|
  # config.use_transactional_fixtures = true
  # config.use_instantiated_fixtures = false
  # config.fixture_path = RAILS_ROOT + '/spec/fixtures'
 
  # You can declare fixtures for each behaviour like this:
  # describe "...." do
  # fixtures :table_a, :table_b
  #
  # Alternatively, if you prefer to declare them only once, you can
  # do so here, like so ...
  #
  # config.global_fixtures = :table_a, :table_b
  #
  # If you declare global fixtures, be aware that they will be declared
  # for all of your examples, even those that don't use them.
end