spec/ppl/application/command_spec.rb in ppl-4.0.1 vs spec/ppl/application/command_spec.rb in ppl-4.0.2

- old
+ new

@@ -12,11 +12,11 @@ describe "#storage=" do it "should accept a storage adapter" do storage = double(Ppl::Adapter::Storage) @command.storage = storage - @command.storage.should be storage + expect(@command.storage).to be storage end end describe "#add_property" do it "should allow new properties to be defined" do @@ -28,63 +28,63 @@ it "should allow properties to have values assigned to them" do class TestCommand456 < Ppl::Application::Command add_property :some_property some_property "a value" end - TestCommand456.some_property.should eq "a value" + expect(TestCommand456.some_property).to eq "a value" end it "should expose properties as instance variables too" do class TestCommand789 < Ppl::Application::Command add_property :some_property some_property "a value" end instance = TestCommand789.new - instance.some_property.should eq "a value" + expect(instance.some_property).to eq "a value" end it "should allow properties to be overwritten by instance variables" do class TestCommand901 < Ppl::Application::Command add_property :some_property some_property "a value" end instance = TestCommand901.new instance.some_property = "different" - instance.some_property.should eq "different" + expect(instance.some_property).to eq "different" end end describe "#name=" do it "should allow the name to be set as an instance variable" do @command.name = "testing" - @command.name.should eq "testing" + expect(@command.name).to eq "testing" end end describe "#description=" do it "should allow the description to be set as an instance variable" do @command.description = "testing" - @command.description.should eq "testing" + expect(@command.description).to eq "testing" end end describe "#name" do it "should allow the name to be set as a class variable" do class TestCommand123 < Ppl::Application::Command name "new_for_test" end command = TestCommand123.new - command.name.should eq "new_for_test" + expect(command.name).to eq "new_for_test" end end describe "#desecription" do it "should allow the description to be set as a class variable" do class TestCommand123 < Ppl::Application::Command description "desc_for_test" end command = TestCommand123.new - command.description.should eq "desc_for_test" + expect(command.description).to eq "desc_for_test" end end end