examples/quicknote/spec/quicknote/form_main_spec.rb in win32-autogui-0.4.3 vs examples/quicknote/spec/quicknote/form_main_spec.rb in win32-autogui-0.5.0
- old
+ new
@@ -61,11 +61,11 @@
end
describe "file open (VK_MENU, VK_F, VK_O)" do
before(:each) do
@filename = "input_file.txt"
- @file_contents = create_file(@filename, "the quick brown fox")
+ @file_contents = write_file(@filename, "the quick brown fox")
@application.file_new(:save => false)
end
after(:each) do
keystroke(VK_N) if @application.message_dialog_confirm
keystroke(VK_ESCAPE) if @application.file_open_dialog
@@ -124,11 +124,11 @@
keystroke(VK_MENU, VK_F, VK_N)
@application.message_dialog_confirm.should be_nil
end
it "should add the filename 'untitled.txt' to the title" do
filename = "input_file.txt"
- file_contents = create_file(filename, "the quick brown fox")
+ file_contents = write_file(filename, "the quick brown fox")
@application.file_open(filename, :save => false)
@application.main_window.title.downcase.should == "QuickNote - #{fullpath(filename)}".downcase
@application.file_new(:save => false)
@application.main_window.title.should == "QuickNote - untitled.txt"
end
@@ -147,11 +147,11 @@
end
describe "file save (VK_MENU, VK_F, VK_S)" do
before(:each) do
@filename = "input_file.txt"
- @file_contents = create_file(@filename, "original content")
+ @file_contents = write_file(@filename, "original content")
@application.file_open(fullpath(@filename), :save => false)
@application.main_window.title.downcase.should == "QuickNote - #{fullpath(@filename)}".downcase
@application.edit_window.text.should == "original content"
@application.set_focus
end
@@ -214,12 +214,12 @@
end
describe "file save as (VK_MENU, VK_F, VK_A)" do
before(:each) do
@filename = "original.txt"
- @file_contents = create_file(@filename, "original content")
+ @file_contents = write_file(@filename, "original content")
@saveas_filename = "newfile.txt"
- create_file(@saveas_filename, "")
+ write_file(@saveas_filename, "")
@application.file_open(fullpath(@filename), :save => false)
end
after(:each) do
keystroke(VK_N) if @application.dialog_overwrite_confirm
keystroke(VK_ESCAPE) if @application.file_save_as_dialog