spec/lib/shards_spec.rb in connection_manager-1.0.4 vs spec/lib/shards_spec.rb in connection_manager-1.1.0
- old
+ new
@@ -6,20 +6,20 @@
context 'shards'do
it "should return an array of results" do
a = Fruit.shards do |shard|
shard.first
end
- a.should be_a_kind_of(Array)
+ expect(a).to be_a(Array)
end
it "should execute the active record methods on the the provided models" do
fruit = FactoryGirl.create(:fruit)
klasses = ["Fruit","SouthernFruit"]
a = Fruit.shards do |shard|
shard.where(:id => fruit.id).first
end
- klasses.include?(a[0].class.name).should be_true
+ expect(klasses.include?(a[0].class.name)).to be_true
end
it "should not matter how the where statement is formated" do
fruit = FactoryGirl.create(:fruit)
@@ -32,9 +32,9 @@
end
cfruit = Fruit.shards do |shard|
shard.where('id = ?', fruit.id).first
end
- (afruit == bfruit && bfruit == cfruit).should be_true
+ expect((afruit == bfruit && bfruit == cfruit)).to be_true
end
end
end
\ No newline at end of file