spec/tasks/dump_spec.rb in dump-1.0.3 vs spec/tasks/dump_spec.rb in dump-1.0.4
- old
+ new
@@ -10,29 +10,29 @@
end
%w[versions create restore cleanup].each do |task|
describe task do
it "should require environment task" do
- @rake["dump:#{task}"].prerequisites.should include("environment")
+ expect(@rake["dump:#{task}"].prerequisites).to include("environment")
end
end
end
describe "versions" do
before do
@task = @rake["dump:versions"]
end
it "should call DumpRake.versions" do
- DumpRake.should_receive(:versions)
+ expect(DumpRake).to receive(:versions)
@task.invoke
end
DumpRake::Env.variable_names_for_command(:versions) do |variable|
DumpRake::Env::DICTIONARY[variable].each do |name|
it "should pass version if it is set through environment variable #{name}" do
- DumpRake.should_receive(:versions).with(variable => '21376')
+ expect(DumpRake).to receive(:versions).with(variable => '21376')
DumpRake::Env.with_env name => '21376' do
@task.invoke
end
end
end
@@ -43,18 +43,18 @@
before do
@task = @rake["dump:create"]
end
it "should call DumpRake.create" do
- DumpRake.should_receive(:create)
+ expect(DumpRake).to receive(:create)
@task.invoke
end
DumpRake::Env.variable_names_for_command(:create) do |variable|
DumpRake::Env::DICTIONARY[variable].each do |name|
it "should pass description if it is set through environment variable #{name}" do
- DumpRake.should_receive(:create).with(variable => 'simple dump')
+ expect(DumpRake).to receive(:create).with(variable => 'simple dump')
DumpRake::Env.with_env name => 'simple dump' do
@task.invoke
end
end
end
@@ -65,18 +65,18 @@
before do
@task = @rake["dump:restore"]
end
it "should call DumpRake.restore" do
- DumpRake.should_receive(:restore)
+ expect(DumpRake).to receive(:restore)
@task.invoke
end
DumpRake::Env.variable_names_for_command(:restore) do |variable|
DumpRake::Env::DICTIONARY[variable].each do |name|
it "should pass version if it is set through environment variable #{name}" do
- DumpRake.should_receive(:restore).with(variable => '21378')
+ expect(DumpRake).to receive(:restore).with(variable => '21378')
DumpRake::Env.with_env name => '21378' do
@task.invoke
end
end
end
@@ -87,17 +87,17 @@
before do
@task = @rake["dump:cleanup"]
end
it "should call DumpRake.cleanup" do
- DumpRake.should_receive(:cleanup)
+ expect(DumpRake).to receive(:cleanup)
@task.invoke
end
DumpRake::Env.variable_names_for_command(:cleanup) do |variable|
DumpRake::Env::DICTIONARY[variable].each do |name|
it "should pass number of dumps to leave if it is set through environment variable #{name}" do
- DumpRake.should_receive(:versions).with(variable => '21376')
+ expect(DumpRake).to receive(:versions).with(variable => '21376')
DumpRake::Env.with_env name => '21376' do
@task.invoke
end
end
end