Blob of spec/spec_helper.rb (raw blob data)

1 # This file is copied to ~/spec when you run 'ruby script/generate rspec'
2 # from the project root directory.
3 ENV["RAILS_ENV"] = "test"
4 require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
5 require 'spec/rails'
6 require File.dirname(__FILE__) + "/spec_dsl"
7
8 Spec::Runner.configure do |config|
9 config.use_transactional_fixtures = true
10 config.use_instantiated_fixtures = false
11 config.fixture_path = RAILS_ROOT + '/spec/fixtures'
12 config.include AuthenticatedTestHelper
13 config.include KeyserSource::SpecDSL
14
15 # config.after(:each) do
16 # path = File.join(GitoriousConfig["repository_base_path"], "*")
17 # Dir[path].each do |dir|
18 # `rm -rf #{dir}`
19 # end
20 # end
21
22 # You can declare fixtures for each behaviour like this:
23 # describe "...." do
24 # fixtures :table_a, :table_b
25 #
26 # Alternatively, if you prefer to declare them only once, you can
27 # do so here, like so ...
28 #
29 config.global_fixtures = :all
30
31 def repo_path
32 File.join(File.dirname(__FILE__), "..", ".git")
33 end
34 #
35 # If you declare global fixtures, be aware that they will be declared
36 # for all of your examples, even those that don't use them.
37 end