OSDN Git Service

add rspec-rails
[praisedb/praisedb.git] / vendor / plugins / rspec-rails / lib / spec / rails / extensions / spec / runner / configuration.rb
1 require 'spec/runner/configuration'
2 require 'test_help'
3
4 if defined?(ActiveRecord::Base)
5   module Spec
6     module Runner
7       class Configuration
8       
9         def initialize
10           super
11           self.fixture_path = RAILS_ROOT + '/spec/fixtures'
12         end
13
14         def use_transactional_fixtures
15           ActiveSupport::TestCase.use_transactional_fixtures
16         end
17         def use_transactional_fixtures=(value)
18           ActiveSupport::TestCase.use_transactional_fixtures = value
19         end
20
21         def use_instantiated_fixtures
22           ActiveSupport::TestCase.use_instantiated_fixtures
23         end
24         def use_instantiated_fixtures=(value)
25           ActiveSupport::TestCase.use_instantiated_fixtures = value
26         end
27
28         def fixture_path
29           ActiveSupport::TestCase.fixture_path
30         end
31         def fixture_path=(path)
32           ActiveSupport::TestCase.fixture_path = path
33         end
34
35         def global_fixtures
36           ActiveSupport::TestCase.fixture_table_names
37         end
38         def global_fixtures=(fixtures)
39           ActiveSupport::TestCase.fixtures(*fixtures)
40         end
41       end
42     end
43   end
44 end