1 require File.dirname(__FILE__) + '/../../spec_helper'
5 describe Configuration, :shared => true do
6 before(:each) { @config = Configuration.new }
9 describe Configuration, "#use_transactional_fixtures" do
10 it_should_behave_like "Spec::Example::Configuration"
12 it "should default to true" do
13 @config.use_transactional_fixtures.should be(true)
16 it "should set to false" do
17 @config.use_transactional_fixtures = false
18 @config.use_transactional_fixtures.should be(false)
21 it "should set to true" do
22 @config.use_transactional_fixtures = true
23 @config.use_transactional_fixtures.should be(true)
27 describe Configuration, "#use_instantiated_fixtures" do
28 it_should_behave_like "Spec::Example::Configuration"
30 it "should to false" do
31 @config.use_instantiated_fixtures.should be(false)
34 it "should set to false" do
35 @config.use_instantiated_fixtures = false
36 @config.use_instantiated_fixtures.should be(false)
39 it "should set to true" do
40 @config.use_instantiated_fixtures = true
41 @config.use_instantiated_fixtures.should be(true)
45 describe Configuration, "#fixture_path" do
46 it_should_behave_like "Spec::Example::Configuration"
48 it "should default to RAILS_ROOT + '/spec/fixtures'" do
49 @config.fixture_path.should == RAILS_ROOT + '/spec/fixtures'
50 Test::Unit::TestCase.fixture_path.should == RAILS_ROOT + '/spec/fixtures'
53 it "should set fixture_path" do
54 @config.fixture_path = "/new/path"
55 @config.fixture_path.should == "/new/path"
56 Test::Unit::TestCase.fixture_path.should == "/new/path"
60 describe Configuration, "#global_fixtures" do
61 it_should_behave_like "Spec::Example::Configuration"
63 it "should default to []" do
64 @config.global_fixtures.should == []
67 it "should set to false" do
68 @config.global_fixtures << :blah
69 @config.global_fixtures.should == [:blah]