Permalink
Browse files

schema tests now just ensure the schema_search_path starts with the i…

…ntended schema rather than checking strict equality
  • Loading branch information...
1 parent 0696d5d commit d68cc6c8be6a6a0fc00e075d17b803146e8be8e3 @bradrobertson bradrobertson committed May 31, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 spec/examples/schema_adapter_examples.rb
@@ -37,11 +37,11 @@
subject.create(schema2) do
@count = User.count
- connection.schema_search_path.should == schema2
+ connection.schema_search_path.should start_with schema2
User.create
end
- connection.schema_search_path.should_not == schema2
+ connection.schema_search_path.should_not start_with schema2
subject.process(schema2){ User.count.should == @count + 1 }
end
@@ -82,7 +82,7 @@
describe "#process" do
it "should connect" do
subject.process(schema1) do
- connection.schema_search_path.should == schema1
+ connection.schema_search_path.should start_with schema1
end
end
@@ -103,7 +103,7 @@
describe "#switch" do
it "should connect to new schema" do
subject.switch(schema1)
- connection.schema_search_path.should == schema1
+ connection.schema_search_path.should start_with schema1
end
it "should reset connection if database is nil" do
@@ -122,6 +122,7 @@
subject.create(1234)
expect {
subject.switch(1234)
+ connection.schema_search_path.should start_with '1234'
}.to_not raise_error
end

0 comments on commit d68cc6c

Please sign in to comment.