Skip to content

Commit

Permalink
fix old specs that still use .thor extension
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdempsey committed Jul 20, 2008
1 parent f39387c commit 2e54de4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/thor_runner_spec.rb
Expand Up @@ -119,7 +119,7 @@ class ThorTask2 < Thor
file = mock("File")
file.should_receive(:puts)

File.should_receive(:open).with(File.join(Thor::Runner.thor_root, Digest::MD5.hexdigest("#{File.dirname(__FILE__)}/fixtures/task.thor" + "randomness")) + ".thor", "w")
File.should_receive(:open).with(File.join(Thor::Runner.thor_root, Digest::MD5.hexdigest("#{File.dirname(__FILE__)}/fixtures/task.thor" + "randomness")), "w")
File.should_receive(:open).with(File.join(Thor::Runner.thor_root, "thor.yml"), "w").once.and_yield(file)

silence(:stdout) { Thor::Runner.start }
Expand All @@ -139,7 +139,7 @@ class ThorTask2 < Thor
describe " update" do
it "updates existing thor files" do
@runner.should_receive(:install).with(@original_yaml["random"][:location], {"as" => "random"}).and_return(true)
File.should_receive(:delete).with(File.join(Thor::Runner.thor_root, @original_yaml["random"][:filename] + ".thor"))
File.should_receive(:delete).with(File.join(Thor::Runner.thor_root, @original_yaml["random"][:filename]))

silence(:stdout) { @runner.update("random") }
end
Expand All @@ -150,7 +150,7 @@ class ThorTask2 < Thor
it "uninstalls existing thor modules" do
@runner.should_receive(:save_yaml)

File.should_receive(:delete).with(File.join(ENV["HOME"], ".thor", "4a33b894ffce85d7b412fc1b36f88fe0.thor"))
File.should_receive(:delete).with(File.join(ENV["HOME"], ".thor", "4a33b894ffce85d7b412fc1b36f88fe0"))
@original_yaml.should_receive(:delete).with("random")

silence(:stdout) { @runner.uninstall("random") }
Expand Down

0 comments on commit 2e54de4

Please sign in to comment.