spec/partitioned/multi_level/configurator/dsl_spec.rb in partitioned-1.3.4 vs spec/partitioned/multi_level/configurator/dsl_spec.rb in partitioned-1.3.5
- old
+ new
@@ -33,28 +33,29 @@
"table_name" => nil,
"parent_table_schema_name" => nil,
"parent_table_name" => nil,
"check_constraint" => nil,
"encoded_name" => nil,
- "using_classes" => []
+ "using_classes" => [],
+ "after_partition_table_create_hooks" => [],
}
end
context "when try to create the new object" do
context "check the model name" do
it "returns Employer" do
- dsl.model.should == Employee
+ expect(dsl.model).to eq(Employee)
end
end # check the model name
context "check the object data" do
it "returns data" do
- dsl.data.instance_values.should == data_stubs
+ expect(dsl.data.instance_values).to eq(data_stubs)
end
end # check the object data
end # when try to create a new object
@@ -64,13 +65,13 @@
describe "on" do
context "when try to set the field which used to partition child tables" do
it "raises InvalidForMultiLevelPartitioning" do
- lambda {
+ expect {
dsl.on
- }.should raise_error(Partitioned::MultiLevel::Configurator::Dsl::InvalidForMultiLevelPartitioning)
+ }.to raise_error(Partitioned::MultiLevel::Configurator::Dsl::InvalidForMultiLevelPartitioning)
end
end # when try to set the field which used to partition child tables
end # on
@@ -79,14 +80,14 @@
context "when try to set the using_classes field" do
it "returns using_classes" do
dsl.using_classes("ByCompanyId", "ByCreatedAt")
- dsl.data.using_classes.first.should == "ByCompanyId"
- dsl.data.using_classes.last.should == "ByCreatedAt"
+ expect(dsl.data.using_classes.first).to eq("ByCompanyId")
+ expect(dsl.data.using_classes.last).to eq("ByCreatedAt")
end
end # when try to set the using_classes field
end # using_classes
-end
\ No newline at end of file
+end